[or-cvs] r19708: {arm} Bug fix: accounting 'time to reset' now includes gmt to loca (arm/trunk/interface)

atagar at seul.org atagar at seul.org
Thu Jun 11 00:48:06 UTC 2009


Author: atagar
Date: 2009-06-10 20:48:06 -0400 (Wed, 10 Jun 2009)
New Revision: 19708

Modified:
   arm/trunk/interface/bandwidthPanel.py
Log:
Bug fix: accounting 'time to reset' now includes gmt to local conversion


Modified: arm/trunk/interface/bandwidthPanel.py
===================================================================
--- arm/trunk/interface/bandwidthPanel.py	2009-06-10 22:05:25 UTC (rev 19707)
+++ arm/trunk/interface/bandwidthPanel.py	2009-06-11 00:48:06 UTC (rev 19708)
@@ -122,7 +122,8 @@
             self.addstr(9, 12, hibernateStr, curses.A_BOLD | util.getColor(hibernateColor))
             self.addstr(9, 12 + len(hibernateStr), "):", curses.A_BOLD)
             
-            sec = time.mktime(time.strptime(accountingParams["accounting/interval-end"], "%Y-%m-%d %H:%M:%S")) - time.time()
+            # timezone subtraction converts from gmt to local
+            sec = time.mktime(time.strptime(accountingParams["accounting/interval-end"], "%Y-%m-%d %H:%M:%S")) - time.time() - time.timezone
             resetHours = sec / 3600
             sec %= 3600
             resetMin = sec / 60



More information about the tor-commits mailing list