Some code donations. Thank you "hideo" and Dan Collins.
Jon@svn.torproject.org

Jon@svn.torproject.org commited on 2009-07-19 05:56:32
Zeige 1 geänderte Dateien mit 3 Einfügungen und 1 Löschungen.

... ...
@@ -843,6 +843,8 @@ print "Fetching the last updated date for each mirror.\n";
843 843
 
844 844
 my $tortime;
845 845
 $tortime = FetchDate("http://www.torproject.org/");
846
+# Adjust offical Tor time by out-of-date offset: number of days * seconds per day 
847
+$tortime -= 1 * 86400; 
846 848
 print "The official time for Tor is $tortime. \n";
847 849
 
848 850
 foreach my $server ( keys %m ) {
... ...
@@ -889,7 +891,7 @@ foreach my $server ( sort { $m{$b}{'updateDate'} <=> $m{$a}{'updateDate'}} keys
889 891
 
890 892
      my $time;
891 893
      if ( "$m{$server}{'updateDate'}" ne "Unknown") {
892
-	  if ( "$m{$server}{'updateDate'}" eq "$tortime" ) {
894
+	  if ( $m{$server}{'updateDate'} > $tortime ) {
893 895
 	    $time = "Up to date";
894 896
 	  } else { $time = "Out of date"; }
895 897
      } else { $time = "Unknown"; }
896 898