From 5bf684d37a9c0a8802e6d78ffbc876ba7b0ea5c3 Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 1 Jun 2010 19:05:07 +0000 Subject: [PATCH] Fix regression in date formatting for purposes other than due dates Thanks to #atheos in IRC for pointing out this problem git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@16547 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 44435f3b85..20fcaa00fb 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP.pm @@ -168,11 +168,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.11.0