From bee60c203a7275083dec49add0d3df8fdf62acf7 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Tue, 16 Jan 2007 11:15:52 +0000 Subject: [PATCH] Fixed conversion of date to Zope DateTime (closes: #145) --- ZPsycopgDA/DA.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ZPsycopgDA/DA.py b/ZPsycopgDA/DA.py index f8cd04a4..a418765b 100644 --- a/ZPsycopgDA/DA.py +++ b/ZPsycopgDA/DA.py @@ -224,17 +224,7 @@ def _cast_DateTime(iso, curs): if iso in ['-infinity', 'infinity']: return iso else: - return DateTime(re.split("GMT\+?|GMT-?|\+|-", iso)[0]) - - # this will split us into [date, time, GMT/AM/PM(if there)] - # dt = str.split(' ') - # if len(dt) > 1: - # # we now should split out any timezone info - # dt[1] = dt[1].split('-')[0] - # dt[1] = dt[1].split('+')[0] - # return DateTime(' '.join(dt[:2])) - # else: - # return DateTime(dt[0]) + return DateTime(iso) # convert an ISO date string from postgres to a Zope DateTime object def _cast_Date(iso, curs):