bagder: curl-www last20threads.pl,1.10,1.11 nicedate.pm,1.2,1.3

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www
In directory labb:/tmp/cvs-serv25100

Modified Files:
	last20threads.pl nicedate.pm 
Log Message:
fixed to present GMT times properly


Index: nicedate.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/nicedate.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- nicedate.pm	19 Dec 2004 22:33:23 -0000	1.2
+++ nicedate.pm	13 May 2005 14:55:11 -0000	1.3
@@ -16,9 +16,9 @@
     my $then_t  = $_[0];
 
     my $now_t = time();
-    my @now = localtime( $now_t );
-    my @yday = localtime( $now_t - 86400 );
-    my @then = localtime( $then_t );
+    my @now = gmtime( $now_t );
+    my @yday = gmtime( $now_t - 86400 );
+    my @then = gmtime( $then_t );
     my $diff = $now_t - $then_t;
     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = @then;
 
@@ -44,10 +44,10 @@
     my $then_t  = $_[0];
 
     my $now_t = time();
-    my @now = localtime( $now_t );
-    my @yday = localtime( $now_t - 86400 );
-    my @nday = localtime( $now_t + 86400 );
-    my @then = localtime( $then_t );
+    my @now = gmtime( $now_t );
+    my @yday = gmtime( $now_t - 86400 );
+    my @nday = gmtime( $now_t + 86400 );
+    my @then = gmtime( $then_t );
     my $diff = abs($now_t - $then_t);
     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = @then;
 

Index: last20threads.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/last20threads.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- last20threads.pl	3 May 2005 13:31:06 -0000	1.10
+++ last20threads.pl	13 May 2005 14:55:11 -0000	1.11
@@ -124,7 +124,7 @@
         my $da = $log{$_};
         my $stamp;
         if($da =~ /^(\d\d\d\d\d\d\d\d)(\d\d)(\d\d)(\d\d)/) {
-            $stamp=`date -u -d "$1 $2:$3:4 +0100" +%s`;
+            $stamp=`date -u -d "$1 $2:$3:4" +%s`; # this is GMT
             chomp $stamp;
             $stamp=reltime($stamp);
         }
@@ -177,6 +177,7 @@
     my ($date, $name, $email, $subject, $inreplyto);
     while(<FILE>) {
         if(/^<!-- isoreceived=\"([^\"]*)\"/) {
+            # this is GMT
             $date = $1;
         }
         elsif(/^<!-- name=\"([^\"]*)\"/) {

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.