diff --git a/webtools/bugzilla/Attachment.pm b/webtools/bugzilla/Attachment.pm index acfa52f63026..4b4b19ec326a 100644 --- a/webtools/bugzilla/Attachment.pm +++ b/webtools/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. diff --git a/webtools/bugzilla/Bugzilla/Attachment.pm b/webtools/bugzilla/Bugzilla/Attachment.pm index acfa52f63026..4b4b19ec326a 100644 --- a/webtools/bugzilla/Bugzilla/Attachment.pm +++ b/webtools/bugzilla/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.