Fixed conversion of date to Zope DateTime (closes: #145)

This commit is contained in:
Federico Di Gregorio 2007-01-16 11:15:52 +00:00
parent e59ef4de4b
commit bee60c203a

View File

@ -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):