mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
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'
This commit is contained in:
parent
2526dbae92
commit
2bf0b4a50c
1 changed files with 1 additions and 1 deletions
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue