mirror of https://github.com/fail2ban/fail2ban
ENH: Added localtime() to MyTime
parent
5a2d518bf2
commit
b6d50c1dea
|
@ -76,4 +76,10 @@ class MyTime:
|
|||
else:
|
||||
return time.gmtime(MyTime.myTime)
|
||||
gmtime = staticmethod(gmtime)
|
||||
|
||||
|
||||
def localtime(x=None):
|
||||
if MyTime.myTime == None or x is not None:
|
||||
return time.localtime(x)
|
||||
else:
|
||||
return time.localtime(MyTime.myTime)
|
||||
localtime = staticmethod(localtime)
|
||||
|
|
Loading…
Reference in New Issue