Bug#4990; Dates below the year 1900, need to be saved in raw format. Thanks Nick Hall

svn: r17771
This commit is contained in:
Rob G. Healey 2011-06-14 01:48:12 +00:00
parent e8a52bfc66
commit 85b6835acb

View File

@ -1415,9 +1415,9 @@ def _create_datetime(date_elements):
if pyear < 1900:
try:
tmpdate = "%04d-%s-%02d %02d:%02d:%02d" % (
pyear, _dd.long_months[pmonth], day,
hour, minutes, seconds)
tmpdate = "%(yr)04d:%(mon)02d:%(dy)02d %(hr)02d:%(mins)02d:%(secs)02d" % {
'yr' : pyear, 'mon' : pmonth, 'dy' : day,
'hr' : hour, 'mins' : minutes, 'secs' : seconds }
except ValueError:
tmpdate = False