]> git.evergreen-ils.org Git - Evergreen.git/commit
TPAC: Invalid due dates cause 500 server error
authorDan Scott <dan@coffeecode.net>
Mon, 8 Oct 2012 15:25:41 +0000 (11:25 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 9 Oct 2012 17:57:44 +0000 (13:57 -0400)
commit09a85ef0dddb9bf05bff352b4b4bccfb219ee8c1
tree0bbbd23dded5c21624b26eeb61715673f061311e
parent95f607400e1adc51c8dea8c38a917ed85c7c2772
TPAC: Invalid due dates cause 500 server error

CStore appears to return dates with leading 0s (such as '0212-10-08
23:59:59-05:17:32') with the leading 0s stripped off, resulting in
cases with 1-digit or 3-digit years for which DateTime::Format::ISO8601
returns an error.

We can protect against this problem by adding some defensive code to the
TPAC utility method to add the 0s back to the start of the year. We can
also log the problem when it occurs so that administrators can fix the
problem dates in the database.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm