Browse code

Some code donations. Thank you "hideo" and Dan Collins.

Jon@svn.torproject.org authored on 19/07/2009 05:56:32
Showing 1 changed files
... ...
@@ -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"; }