[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20085: {website} Some code donations. Thank you "hideo" and Dan Collins. (website/trunk)



Author: Jon
Date: 2009-07-18 23:56:32 -0400 (Sat, 18 Jul 2009)
New Revision: 20085

Modified:
   website/trunk/update-mirrors.pl
Log:
Some code donations.  Thank you "hideo" and Dan Collins.

Modified: website/trunk/update-mirrors.pl
===================================================================
--- website/trunk/update-mirrors.pl	2009-07-18 21:53:32 UTC (rev 20084)
+++ website/trunk/update-mirrors.pl	2009-07-19 03:56:32 UTC (rev 20085)
@@ -843,6 +843,8 @@
 
 my $tortime;
 $tortime = FetchDate("http://www.torproject.org/";);
+# Adjust offical Tor time by out-of-date offset: number of days * seconds per day 
+$tortime -= 1 * 86400; 
 print "The official time for Tor is $tortime. \n";
 
 foreach my $server ( keys %m ) {
@@ -889,7 +891,7 @@
 
      my $time;
      if ( "$m{$server}{'updateDate'}" ne "Unknown") {
-	  if ( "$m{$server}{'updateDate'}" eq "$tortime" ) {
+	  if ( $m{$server}{'updateDate'} > $tortime ) {
 	    $time = "Up to date";
 	  } else { $time = "Out of date"; }
      } else { $time = "Unknown"; }