From bc580e33837f79f640fc603db328fb29851155fd Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Sat, 30 Sep 2006 06:24:24 +0000 Subject: [PATCH] Fixed #129. --- ChangeLog | 3 +++ ZPsycopgDA/DA.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8463f396..4a31b9bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-30 Federico Di Gregorio + * ZpsycopgDA/DA.py: we now split on GMT+, GMT-, + or -. This should + fix bug #129. + * psycopg/adapter_datetime.py: now TimeFromTicks and TimestampFromTicks both accept fractionary seconds (fixes #130). diff --git a/ZPsycopgDA/DA.py b/ZPsycopgDA/DA.py index 2a0f4dd1..ba0443f3 100644 --- a/ZPsycopgDA/DA.py +++ b/ZPsycopgDA/DA.py @@ -18,7 +18,8 @@ # See the LICENSE file for details. -ALLOWED_PSYCOPG_VERSIONS = ('2.0.1', '2.0.2', '2.0.3', '2.0.4', '2.0.5') +ALLOWED_PSYCOPG_VERSIONS = ('2.0.1', '2.0.2', '2.0.3', '2.0.4', '2.0.5', + '2.0.6') import sys import time @@ -220,7 +221,7 @@ for icon in ('table', 'view', 'stable', 'what', 'field', 'text', 'bin', # convert an ISO timestamp string from postgres to a Zope DateTime object def _cast_DateTime(iso, curs): if iso: - return DateTime(re.split("GMT\+?|GMT-?", iso)[0]) + return DateTime(re.split("GMT\+?|GMT-?|\+|-", iso)[0]) # this will split us into [date, time, GMT/AM/PM(if there)] # dt = str.split(' ')