time.mktime argument should be tuple

pull/128/merge^2
Steven Hiscocks 2013-02-23 21:01:39 +00:00
parent 2ecf34540e
commit ad7119a3fe
2 changed files with 4 additions and 4 deletions

View File

@ -194,7 +194,7 @@ class DateDetector:
if date == None:
return None
else:
return time.mktime(date)
return time.mktime(tuple(date))
##
# Sort the template lists using the hits score. This method is not called

View File

@ -162,10 +162,10 @@ class DateStrptime(DateTemplate):
# Bug fix for #1241756
# If the date is greater than the current time, we suppose
# that the log is not from this year but from the year before
if time.mktime(date) > MyTime.time():
if time.mktime(tuple(date)) > MyTime.time():
logSys.debug(
u"Correcting deduced year from %d to %d since %f > %f" %
(date[0], date[0]-1, time.mktime(date), MyTime.time()))
"Correcting deduced year from %d to %d since %f > %f" %
(date[0], date[0]-1, time.mktime(tuple(date)), MyTime.time()))
date[0] -= 1
elif date[1] == 1 and date[2] == 1:
# If it is Jan 1st, it is either really Jan 1st or there