mirror of https://github.com/fail2ban/fail2ban
Tai64N stores time in GMT, we need to convert to local time before returning
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@764 a942ae1a-1317-0410-a47c-b1dcaea8d605_tent/ipv6_via_aInfo
parent
2a38820ed6
commit
12304f7a3e
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
# This file is part of Fail2Ban.
|
||||
#
|
||||
# Fail2Ban is free software; you can redistribute it and/or modify
|
||||
|
@ -168,7 +168,8 @@ class DateTai64n(DateTemplate):
|
|||
# extract part of format which represents seconds since epoch
|
||||
value = dateMatch.group()
|
||||
seconds_since_epoch = value[2:17]
|
||||
date = list(time.gmtime(int(seconds_since_epoch, 16)))
|
||||
# convert seconds from HEX into local time stamp
|
||||
date = list(time.localtime(int(seconds_since_epoch, 16)))
|
||||
return date
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue