From: bbaetz%student.usyd.edu.au <> Date: Wed, 23 Jan 2002 08:24:31 +0000 (+0000) Subject: Bug 93037 - use YYYY-MM-DD HH:MM formatting for attachment dates X-Git-Tag: bugzilla-2.16rc1~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=779c0c0c410d04dcd4376fe6cb52a7fe0dad6344;p=thirdparty%2Fbugzilla.git Bug 93037 - use YYYY-MM-DD HH:MM formatting for attachment dates r=gerv,myk --- diff --git a/Attachment.pm b/Attachment.pm index acfa52f630..4b4b19ec32 100644 --- a/Attachment.pm +++ b/Attachment.pm @@ -73,9 +73,10 @@ sub list my %a; ($a{'attachid'}, $a{'date'}, $a{'contenttype'}, $a{'description'}, $a{'ispatch'}, $a{'isobsolete'}) = &::FetchSQLData(); - # Format the attachment's creation/modification date into something readable. - if ($a{'date'} =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { - $a{'date'} = "$3/$4/$2 $5:$6"; + # Format the attachment's creation/modification date into a standard + # format (YYYY-MM-DD HH:MM) + if ($a{'date'} =~ /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { + $a{'date'} = "$1-$2-$3 $4:$5"; } # Retrieve a list of status flags that have been set on the attachment. diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index acfa52f630..4b4b19ec32 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -73,9 +73,10 @@ sub list my %a; ($a{'attachid'}, $a{'date'}, $a{'contenttype'}, $a{'description'}, $a{'ispatch'}, $a{'isobsolete'}) = &::FetchSQLData(); - # Format the attachment's creation/modification date into something readable. - if ($a{'date'} =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { - $a{'date'} = "$3/$4/$2 $5:$6"; + # Format the attachment's creation/modification date into a standard + # format (YYYY-MM-DD HH:MM) + if ($a{'date'} =~ /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { + $a{'date'} = "$1-$2-$3 $4:$5"; } # Retrieve a list of status flags that have been set on the attachment.