[Koha-bugs] [Bug 9031] Overdue items crossing DST boundary throw invalid local time exception

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 26 10:13:29 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9031

--- Comment #20 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 68578
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68578&action=edit
Bug 9031: (QA follow-up) Final changes to Calendar::days_between

The crash is caused by comparing two datetimes where one datetime is
floating and the other one was not. In that case the floating is
converted. Note too that DateTime overloads comparison operators.

This patch clones the two dates first. Puts them in floating both. And
just after that starts comparing etc.

Similar small change in hours_between.

Adding a test where the parameters are swapped for days_between.

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list