[Koha-bugs] [Bug 8110] Fines accruing on closed days

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 21 16:49:28 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8110

--- Comment #29 from Julian Maurice <julian.maurice at biblibre.com> ---
In fact, truncation is not the problem. It's how DateTime::Duration is handled.
In C4::Overdues::_get_chargeable_units, only days part of duration is used.
months and years are ignored.
The problem is a DateTime::Duration object with months and years cannot be used
to calculate the total number of days because we don't know if years are leap
years, or if months contains 28 or 31 days.
I think the solution is to modify days_between so that it returns a number of
days instead of a DateTime::Duration object (same for hours_between I think: it
should return a number of hours)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list