utils.py
branchstable
changeset 4501 71ba2d0f34f2
parent 4317 b2093f8f0493
child 4510 8dc44329f5c8
--- a/utils.py	Thu Feb 04 18:29:43 2010 +0100
+++ b/utils.py	Fri Feb 05 17:57:51 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)