From 4246ddce1e73f34a8cabb1e835895848ab1def48 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 26 Jan 2010 12:01:37 +0530 Subject: [PATCH] strip ending. from time --- oxlib/format.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oxlib/format.py b/oxlib/format.py index 8d7aae6..96ae90f 100644 --- a/oxlib/format.py +++ b/oxlib/format.py @@ -261,7 +261,9 @@ def time2ms(timeString): ms = 0.0 p = timeString.split(':') for i in range(len(p)): - ms = ms * 60 + float(p[i]) + _p = p[i] + if _p.endswith('.'): _p =_p[:-1] + ms = ms * 60 + float(_p) return int(ms * 1000) def shiftTime(offset, timeString):