Revision: 4056
Author: pekka.klarck
Date: Tue Sep  7 12:40:08 2010
Log: Oops, removing long() earlier wasn't such a good idea because this method returned floats as a result. Can use int() now because ints in Python > 2.3 don't overflow. Now also round millis correctly -- let's see what tests that one breaks.
http://code.google.com/p/robotframework/source/detail?r=4056

Modified:
 /trunk/src/robot/utils/robottime.py

=======================================
--- /trunk/src/robot/utils/robottime.py Tue Sep  7 12:04:48 2010
+++ /trunk/src/robot/utils/robottime.py Tue Sep  7 12:40:08 2010
@@ -325,7 +325,7 @@
         = _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))
-    return 1000*secs + millis
+    return int(round(1000*secs + millis))

 def _split_timestamp(timestamp, seps):
     for sep in seps:

Reply via email to