From: joy <> Date: Sun, 25 May 2003 20:49:53 +0000 (-0800) Subject: [project @ 2003-05-25 13:49:53 by joy] X-Git-Tag: release/2.6.0~894 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7dce26e94631f454e6e68ae3c22bc31d892e4f24;p=debbugs.git [project @ 2003-05-25 13:49:53 by joy] replaced another date(1) fork with a much cleaner strftime method --- diff --git a/scripts/db2html.in b/scripts/db2html.in index fea75177..c7f0ba0c 100755 --- a/scripts/db2html.in +++ b/scripts/db2html.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: db2html.in,v 1.16 2003/05/25 13:25:51 joy Exp $ +# $Id: db2html.in,v 1.17 2003/05/25 13:49:53 joy Exp $ # usage: db2html [-diff] [-stampfile=] [-lastrun=] #load the necessary libraries/configuration @@ -203,14 +203,11 @@ for $f (@files) $font= length($font) ? "<$font>" : ''; $daysold= "; $font$days days old$efont"; } - if ($preserveonly) { $submitted= 'THIS IS A BUG IN THE BUG PROCESSOR'; } - else - { $submitted= `TZ=GMT LANG=C \\ - date -d '1 Jan 1970 00:00:00 + $data->{date} seconds' \\ - '+ %a, %d %b %Y %T %Z'`; - $? and die $?; + if ($preserveonly) { + $submitted = 'THIS IS A BUG IN THE BUG PROCESSOR'; + } else { + $submitted = strftime "%a, %e %b %Y %T %Z", gmtime($data->{date}); } - $submitted =~ s/\n$//; $submitted =~ s/, 0/, /g; $submitted= "; dated $submitted"; $indexpart= "pending$addseverity"; }