Commit 27e8d699 by Ned Batchelder

On 32-bit Python, this conversion could overflow, for example, for year 2099. …

On 32-bit Python, this conversion could overflow, for example, for year 2099.  This conversion won't.
parent 537d6dd1
......@@ -446,7 +446,7 @@ class CourseDescriptor(SequenceDescriptor):
# utility function to get datetime objects for dates used to
# compute the is_new flag and the sorting_score
def to_datetime(timestamp):
return datetime.fromtimestamp(time.mktime(timestamp))
return datetime(*timestamp[:6])
def get_date(field):
timetuple = self._try_parse_time(field)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment