From: dbs Date: Tue, 1 Jun 2010 19:19:08 +0000 (+0000) Subject: Forward port r16547 from rel_1_6_0: fix regression in date formatting for non-due... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fef9972bce0fbaf4e1a4480aa0048a1f34d2c6ea;p=evergreen%2Fbjwebb.git Forward port r16547 from rel_1_6_0: fix regression in date formatting for non-due dates git-svn-id: svn://svn.open-ils.org/ILS/trunk@16549 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/SIP.pm b/Open-ILS/src/perlmods/OpenILS/SIP.pm index 3d35dacaf..8afa7528d 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP.pm @@ -154,11 +154,11 @@ sub format_date { my $minute = $time[1]; my $second = $time[0]; - $date = sprintf("%04d-%02d-%02d", $year, $mon, $day); - - # Due dates need time of day as well + $date = sprintf("%04d%02d%02d", $year, $mon, $day); + + # Due dates need hyphen separators and time of day as well if ($type eq 'due') { - $date .= sprintf(" %02d:%02d:%02d", $hour, $minute, $second); + $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $year, $mon, $day, $hour, $minute, $second); } syslog('LOG_DEBUG', "OILS: formatted date [type=$type]: $date");