Revision: 4058
Author: pekka.klarck
Date: Tue Sep 7 13:09:05 2010
Log: Oooops again. Actually we need to use the known DST setting
(time.daylight) when converting timestaps to millis and not guess (-1). One
atest failed due to the change, wonder could this be somehow utested too.
http://code.google.com/p/robotframework/source/detail?r=4058
Modified:
/trunk/src/robot/utils/robottime.py
=======================================
--- /trunk/src/robot/utils/robottime.py Tue Sep 7 12:42:32 2010
+++ /trunk/src/robot/utils/robottime.py Tue Sep 7 13:09:05 2010
@@ -321,10 +321,8 @@
def _timestamp_to_millis(timestamp, seps):
- years, mons, days, hours, mins, secs, millis \
- = _split_timestamp(timestamp, seps)
- # -1 means that mktime will guess should it use DST based on date and
time
- secs = time.mktime((years, mons, days, hours, mins, secs, 0, 0, -1))
+ Y, M, D, h, m, s, millis = _split_timestamp(timestamp, seps)
+ secs = time.mktime((Y, M, D, h, m, s, 0, 0, time.daylight))
return int(round(1000*secs + millis))
def _split_timestamp(timestamp, seps):