[Checkins] SVN:	Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/activity.py	Add timezone
    Charlie Clark 
    charlie at begeistert.org
       
    Tue Dec  6 10:18:04 UTC 2011
    
    
  
Log message for revision 123592:
  Add timezone
  Move utility variable "now" into utility function and add doc string.
Changed:
  U   Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/activity.py
-=-
Modified: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/activity.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/activity.py	2011-12-06 10:16:47 UTC (rev 123591)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/activity.py	2011-12-06 10:18:03 UTC (rev 123592)
@@ -87,9 +87,9 @@
         end_time = ''
         if analysis is not None:
             segment_time = analysis[0]['end'] - analysis[0]['start']
-            start_time = time.strftime("%a, %d %b %Y %H:%M:%S",
+            start_time = time.strftime("%a, %d %b %Y %H:%M:%S %Z",
                                        time.gmtime(analysis[0]['start']))
-            end_time = time.strftime("%a, %d %b %Y %H:%M:%S",
+            end_time = time.strftime("%a, %d %b %Y %H:%M:%S %Z",
                                      time.gmtime(analysis[-1]['end']))
 
         divs = []
@@ -100,9 +100,10 @@
         )
 
         limit = max(((d['stores'] + d['loads']) for d in analysis))
-        now = analysis[-1]['end']
 
         def calculated():
+            """Utility function to calculate bar heights and time offsets"""
+            now = analysis[-1]['end']
             for div in analysis:
                 stores = div['stores']
                 loads = div['loads']
    
    
More information about the checkins
mailing list