From e11b39a4f4b57a15fddcd83f308fa86eb6cf97b1 Mon Sep 17 00:00:00 2001 From: adustman Date: Mon, 27 Feb 2006 05:49:26 +0000 Subject: [PATCH] Fix fubared TimeDelta_or_None and Time_or_None --- MySQLdb/MySQLdb/pytimes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MySQLdb/MySQLdb/pytimes.py b/MySQLdb/MySQLdb/pytimes.py index 817dbbf..954e4d4 100644 --- a/MySQLdb/MySQLdb/pytimes.py +++ b/MySQLdb/MySQLdb/pytimes.py @@ -50,8 +50,8 @@ def TimeDelta_or_None(s): from math import modf try: h, m, s = s.split(':') - td = timedelta(hours=int(h), minutes=int(m), seconds=int(s), - microseconds=int(modf(float(s))[0])*1000000) + td = timedelta(hours=int(h), minutes=int(m), seconds=int(float(s)), + microseconds=int(modf(float(s))[0]*1000000)) if h < 0: return -td else: @@ -63,8 +63,8 @@ def Time_or_None(s): from math import modf try: h, m, s = s.split(':') - return time(hour=int(h), minute=int(m), second=int(s), - microsecond=int(modf(float(s))[0])*1000000) + return time(hour=int(h), minute=int(m), second=int(float(s)), + microsecond=int(modf(float(s))[0]*1000000)) except: return None