[Koha-bugs] [Bug 13601] Get rid of DateTime::Format::DateParse
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jan 20 17:21:40 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13601
--- Comment #6 from Colin Campbell <colin.campbell at ptfs-europe.com> ---
(In reply to Jonathan Druart from comment #0)
> For a couple of reasons, dt_from_string should not use
> DateTime::Format::DateParse:
> 1/ It does not manage date < 1900 (certainly caused by l.47 of this module:
> $p{ year } = $year ? $year + 1900 : DateTime->now->year;
> 2/ It considers 31/01/2015 as a valid us date, which is not.
The reason dates before 1900 are not handled is in the doc for Date::Parse
Date::Parse uses Time::Local internally, so is limited to only parsing
dates which result in valid values for Time::Local::timelocal. This
generally means dates between 1901-12-17 00:00:00 GMT and 2038-01-16
23:59:59 GMT
That wasnt a problem with DateUtils as it was just ensuring the old C4::Dates
routines could be handled which were also unable to handle pre 1900 dates
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list