commit 1d1d15fed03c226c7482e0310a23e28706edf9d2
Author: Arturo Filastò <[email protected]>
Date:   Tue Apr 3 18:13:26 2012 -0700

    Properly convert time to UTC before doing calculation
    Fixing #5318
---
 js/models/relay.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/js/models/relay.js b/js/models/relay.js
index ccefeec..8e9583d 100644
--- a/js/models/relay.js
+++ b/js/models/relay.js
@@ -60,6 +60,7 @@ define([
             var utct = t[1].split(":");
             var d = new Date(utcd[0], utcd[1]-1, utcd[2], utct[0], utct[1], 
utct[2]);
             var now = new Date();
+            now = new Date(now.getUTCFullYear(), now.getUTCMonth(), 
now.getUTCDate(),  now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
             var diff = now-d;
             var secs = Math.round(diff/1000);
             var mins = Math.floor(secs/60);

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to