[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 11:52:35 CEST 2017


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

--- Comment #25 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 68582
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68582&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>

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

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


More information about the Koha-bugs mailing list