Patches item #1578415, was opened at 2006-10-16 13:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578415&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: ptwobrussell (ptwobrussell)
Assigned to: Nobody/Anonymous (nobody)
Summary: exception called b/c of issue with millisecs in date string
Initial Comment:
A patch to fix an issue caused when pgdb returns a
date/time string that contains milliseconds in it:
col.py.orig is the original file. col.py is the updated
file
Patch is inline below:
--- col.py.orig 2006-10-16 14:11:30.000000000 -0400
+++ col.py 2006-10-16 14:13:28.000000000 -0400
@@ -941,7 +941,8 @@
else:
return
datetime.time(value.hour, value.minute, int(value.second))
try:
- stime = time.strptime(value, self.format)
+ #postgres might return a time value
with milliseconds. strip it or else change the format
string
+ stime =
time.strptime(value[value.rfind('.')], self.format)
except:
raise validators.Invalid("expected an
date/time string of the '%s' format in the DateTimeCol
'%s', got %s %r instead" % \
(self.format, self.name,
type(value), value), value, state)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578415&group_id=74338
|