From fef9972bce0fbaf4e1a4480aa0048a1f34d2c6ea Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 1 Jun 2010 19:19:08 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/SIP.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/SIP.pm b/Open-ILS/src/perlmods/OpenILS/SIP.pm index 3d35dacafe..8afa7528dc 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"); -- 2.43.2