]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-05-25 14:43:30 by joy]
authorjoy <>
Sun, 25 May 2003 21:43:30 +0000 (13:43 -0800)
committerjoy <>
Sun, 25 May 2003 21:43:30 +0000 (13:43 -0800)
in the event the leap seconds really exist in our systems, specify UTC localtime instead of gmtime

scripts/db2html.in
scripts/html-control.in
scripts/process.in

index c7f0ba0cb5b56362838fa617093876948fbfb8c6..6c4b7c9c1f7f215abe3d27a27ca0e165d87b4703 100755 (executable)
@@ -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=<stampfile>] [-lastrun=<days>] <wwwbase>
 
 #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";
index c0bb93ef7e85c701e0ca70bdeee1e8aa2fc3c06d..f263c375f508d0fcfca44a37eb6ee0bdef916996 100755 (executable)
@@ -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: $!");
 }
index 8cd0c3e71db5f6edce1c3ee95e52669bc52f23d8..a2c489c30e6d6a602cdf159bcab5eecee50b4754 100755 (executable)
@@ -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= <<END;
 Received: via spool by $baddress\@$gEmailDomain id=$nn
           (code $codeletter ref $tryref); $tdate