From f71de540d759bcdbbc6b03b00dd6902fd33f3f54 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 29 Mar 2011 14:55:43 +0000 Subject: [PATCH] change format of time in auditlog git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9178 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MsgUtils.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index 1a9082755..bf212c1ab 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -484,9 +484,10 @@ sub message { my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); - my $currtime = sprintf("%02d-%02d-%04d %02d:%02d:%02d", - $mon + 1, $mday, $year + 1900, - $hour, $min, $sec); + + my $currtime = sprintf("%04d-%02d-%02d %02d:%02d:%02d", + $year + 1900, $mon + 1, $mday, + $hour, $min, $sec); $auditlogentry->{audittime} = $currtime; $auditlogentry->{userid} = $newrsp->{userid}->[0];