From 8308b8de7e6944fdd49a7bed9f6e333065135300 Mon Sep 17 00:00:00 2001 From: adustman Date: Sat, 22 Nov 2003 19:30:40 +0000 Subject: [PATCH] Bug #816721 --- MySQLdb/MySQLdb/pytimes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MySQLdb/MySQLdb/pytimes.py b/MySQLdb/MySQLdb/pytimes.py index 338afbf..d0437f9 100644 --- a/MySQLdb/MySQLdb/pytimes.py +++ b/MySQLdb/MySQLdb/pytimes.py @@ -38,7 +38,7 @@ def DateTime_or_None(s): try: d, t = s.split(sep, 1) - return apply(datetime, tuple(d.split('-')+t.split(':'))) + return apply(datetime, tuple(map(int, d.split('-')+t.split(':')))) except: return None @@ -53,5 +53,5 @@ def TimeDelta_or_None(s): return None def Date_or_None(s): - try: return apply(date, tuple(s.split('-',2))) + try: return apply(date, tuple(map(int, s.split('-',2)))) except: return None