merge stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 08 Feb 2010 15:28:18 +0100
branchstable
changeset 4504 f1d505f979b3
parent 4500 81021d62138f (current diff)
parent 4502 1422589c35a0 (diff)
child 4505 a82af6b000f2
merge
--- a/utils.py	Mon Feb 08 13:33:09 2010 +0100
+++ b/utils.py	Mon Feb 08 15:28:18 2010 +0100
@@ -15,9 +15,9 @@
 import datetime as pydatetime
 from md5 import md5
 from datetime import datetime, timedelta, date
-from time import time, mktime
+from time import time
 from random import randint, seed
-from calendar import monthrange
+from calendar import monthrange, timegm
 
 # initialize random seed from current time
 seed()
@@ -44,7 +44,7 @@
     return datetime(somedate.year, somedate.month, somedate.day)
 
 def datetime2ticks(date):
-    return mktime(date.timetuple()) * 1000
+    return timegm(date.timetuple()) * 1000
 
 ONEDAY = timedelta(days=1)
 ONEWEEK = timedelta(days=7)