[LNT] r179706 - lnttool: Fix time computation in 'lnt send-daily-report' --today option.

Daniel Dunbar daniel at zuster.org
Wed Apr 17 11:43:59 PDT 2013


Author: ddunbar
Date: Wed Apr 17 13:43:59 2013
New Revision: 179706

URL: http://llvm.org/viewvc/llvm-project?rev=179706&view=rev
Log:
lnttool: Fix time computation in 'lnt send-daily-report' --today option.

 - The time we use to compute the report time should be in UTC, since that is
   what the daily report does its computation in.

Modified:
    lnt/trunk/lnt/lnttool/main.py

Modified: lnt/trunk/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/main.py?rev=179706&r1=179705&r2=179706&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/main.py (original)
+++ lnt/trunk/lnt/lnttool/main.py Wed Apr 17 13:43:59 2013
@@ -305,7 +305,7 @@ def action_send_daily_report(name, args)
     ts = db.testsuite[opts.testsuite]
 
     if opts.today:
-        date = datetime.datetime.now()
+        date = datetime.datetime.utcnow()
     else:
         # Get a timestamp to use to derive the daily report to generate.
         latest = ts.query(ts.Run).\
@@ -317,7 +317,7 @@ def action_send_daily_report(name, args)
             date = latest.start_time + datetime.timedelta(hours=1)
         else:
             # Otherwise, just use now.
-            date = datetime.datetime.now()
+            date = datetime.datetime.utcnow()
 
     # Generate the daily report.
     note("building report data...")





More information about the llvm-commits mailing list