This commit is contained in:
Federico Di Gregorio 2006-09-30 06:24:24 +00:00
parent 168d9c36af
commit bc580e3383
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2006-09-30 Federico Di Gregorio <fog@initd.org> 2006-09-30 Federico Di Gregorio <fog@initd.org>
* ZpsycopgDA/DA.py: we now split on GMT+, GMT-, + or -. This should
fix bug #129.
* psycopg/adapter_datetime.py: now TimeFromTicks and * psycopg/adapter_datetime.py: now TimeFromTicks and
TimestampFromTicks both accept fractionary seconds (fixes #130). TimestampFromTicks both accept fractionary seconds (fixes #130).

View File

@ -18,7 +18,8 @@
# See the LICENSE file for details. # 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 sys
import time 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 # convert an ISO timestamp string from postgres to a Zope DateTime object
def _cast_DateTime(iso, curs): def _cast_DateTime(iso, curs):
if iso: 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)] # this will split us into [date, time, GMT/AM/PM(if there)]
# dt = str.split(' ') # dt = str.split(' ')