strptime bug fix: if gmtoff is None we have 1 hour increment of time (through utctimetuple), compare:

>>>> datetime.datetime.fromtimestamp(time.mktime(datetime.datetime.now().timetuple())).strftime("%Y-%m-%d %H:%M:%S")
'2014-04-29 17:26:31'
>>>> datetime.datetime.fromtimestamp(time.mktime(datetime.datetime.now().utctimetuple())).strftime("%Y-%m-%d %H:%M:%S")
'2014-04-29 18:26:37'
pull/721/head
sebres 2014-05-14 22:26:22 +01:00 committed by Steven Hiscocks
parent 2526dbae92
commit 2bf0b4a50c
1 changed files with 1 additions and 1 deletions

View File

@ -190,5 +190,5 @@ def reGroupDictStrptime(found_dict):
if gmtoff is not None:
return calendar.timegm(date_result.utctimetuple())
else:
return time.mktime(date_result.utctimetuple())
return time.mktime(date_result.timetuple())