Description
From megago...@gmail.com on July 19, 2010 23:18:55
What steps will reproduce the problem? 1. test = couchdb.mapping.DateTimeField()
2. test._to_python(u'1880-01-01T00:00:00Z') raises an exception 3. What is the expected output? What do you see instead? It should return a datetime.datetime object.
It raises ValueError: Invalid ISO date/time. What version of the product are you using? On what operating system? couchdb 0.7
python 2.6.4
mac os 10.5 Please provide any additional information below. It is actually the call to datetime.utcfromtimestamp that is raising the exception ValueError: timestamp out of range for platform time_t
Instead of:
timestamp = timegm(strptime(value, '%Y-%m-%dT%H:%M:%S'))
value = datetime.utcfromtimestamp(timestamp)
maybe use this?:
value = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S')
Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=142