From 7dce26e94631f454e6e68ae3c22bc31d892e4f24 Mon Sep 17 00:00:00 2001 From: joy <> Date: Sun, 25 May 2003 12:49:53 -0800 Subject: [PATCH] [project @ 2003-05-25 13:49:53 by joy] replaced another date(1) fork with a much cleaner strftime method --- scripts/db2html.in | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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"; } -- 2.39.5