https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12669
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #30 from David Cook <[email protected]> --- I don't think this patch is actually a good idea... you're only sometimes - and very unexpectedly - making a DateTime object with a floating timezone. Consider the following from DateTime's perldoc (http://search.cpan.org/~drolsky/DateTime-1.26/lib/DateTime.pm#): "Floating DateTimes The default time zone for new DateTime objects, except where stated otherwise, is the "floating" time zone. This concept comes from the iCal standard. A floating datetime is one which is not anchored to any particular time zone. In addition, floating datetimes do not include leap seconds, since we cannot apply them without knowing the datetime's time zone. The results of date math and comparison between a floating datetime and one with a real time zone are not really valid, because one includes leap seconds and the other does not. Similarly, the results of datetime math between two floating datetimes and two datetimes with time zones are not really comparable. If you are planning to use any objects with a real time zone, it is strongly recommended that you do not mix these with floating datetimes." -- I think it would be smarter to actually review where we're using timezones and re-read http://search.cpan.org/~drolsky/DateTime-1.26/lib/DateTime.pm#How_DateTime_Math_Works. -- Another idea would be to use DateTime->ymd() instead of DateTime->truncate() (http://search.cpan.org/~drolsky/DateTime-1.26/lib/DateTime.pm#$dt->ymd(_$optional_separator_),_$dt->mdy(...),_$dt->dmy(...)), so that you're actually just comparing the date portion of a datestamp rather than possibly creating an invalid local time. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
