From 98a58b68b682bd8095af99844524eaa05ec22462 Mon Sep 17 00:00:00 2001 From: joy <> Date: Sun, 25 May 2003 13:43:30 -0800 Subject: [PATCH] [project @ 2003-05-25 14:43:30 by joy] in the event the leap seconds really exist in our systems, specify UTC localtime instead of gmtime --- scripts/db2html.in | 10 ++++++---- scripts/html-control.in | 8 +++++--- scripts/process.in | 8 +++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/db2html.in b/scripts/db2html.in index c7f0ba0c..6c4b7c9c 100755 --- a/scripts/db2html.in +++ b/scripts/db2html.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: db2html.in,v 1.17 2003/05/25 13:49:53 joy Exp $ +# $Id: db2html.in,v 1.18 2003/05/25 14:43:30 joy Exp $ # usage: db2html [-diff] [-stampfile=] [-lastrun=] #load the necessary libraries/configuration @@ -11,7 +11,9 @@ require("$config_path/text"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; -use POSIX qw(strftime); +use POSIX qw(strftime tzset); +$ENV{"TZ"} = 'UTC'; +tzset(); #set current working directory chdir("$gSpoolDir") || die "chdir spool: $!\n"; @@ -30,7 +32,7 @@ $indexunmatched = ''; 'forwarded','forwarded to upstream software authors'); #set timestamp for html files -$dtime = strftime "%a, %e %b %Y %T UTC", gmtime; +$dtime = strftime "%a, %e %b %Y %T UTC", localtime; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; #check for commandline switches @@ -206,7 +208,7 @@ for $f (@files) if ($preserveonly) { $submitted = 'THIS IS A BUG IN THE BUG PROCESSOR'; } else { - $submitted = strftime "%a, %e %b %Y %T %Z", gmtime($data->{date}); + $submitted = strftime "%a, %e %b %Y %T %Z", localtime($data->{date}); } $submitted= "; dated $submitted"; $indexpart= "pending$addseverity"; diff --git a/scripts/html-control.in b/scripts/html-control.in index c0bb93ef..f263c375 100755 --- a/scripts/html-control.in +++ b/scripts/html-control.in @@ -1,7 +1,9 @@ #!/usr/bin/perl -# $Id: html-control.in,v 1.9 2003/05/25 13:25:51 joy Exp $ +# $Id: html-control.in,v 1.10 2003/05/25 14:43:30 joy Exp $ -use POSIX qw(strftime); +use POSIX qw(strftime tzset); +$ENV{"TZ"} = 'UTC'; +tzset(); $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; @@ -32,7 +34,7 @@ if (open(US,'updateseqs') && -f 'stamp.html') { rename("stamp.html","stamp.html.run") or &quit("rename stamp.html: $!"); } else { $lastsub=0; - $lastmain = strftime "%Y%m%d%H%M%S", gmtime; + $lastmain = strftime "%Y%m%d%H%M%S", localtime; $args= '-full'; unlink('stamp.html') || $!==&ENOENT or &quit("excise stale stamp.html: $!"); } diff --git a/scripts/process.in b/scripts/process.in index 8cd0c3e7..a2c489c3 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -1,10 +1,12 @@ #!/usr/bin/perl -# $Id: process.in,v 1.69 2003/05/25 13:32:02 joy Exp $ +# $Id: process.in,v 1.70 2003/05/25 14:43:30 joy Exp $ # # Usage: process nn # Temps: incoming/Pnn -use POSIX qw(strftime); +use POSIX qw(strftime tzset); +$ENV{"TZ"} = 'UTC'; +tzset(); use Mail::Address; use MIME::Parser; @@ -55,7 +57,7 @@ chomp @msg; print DEBUG "###\n",join("##\n",@msg),"\n###\n"; -$tdate = strftime "%a, %d %h %Y %T UTC", gmtime; +$tdate = strftime "%a, %d %h %Y %T UTC", localtime; $fwd= <