mirror of https://github.com/fail2ban/fail2ban
ENH: Added localtime() to MyTime
parent
5a2d518bf2
commit
b6d50c1dea
|
@ -77,3 +77,9 @@ class MyTime:
|
||||||
return time.gmtime(MyTime.myTime)
|
return time.gmtime(MyTime.myTime)
|
||||||
gmtime = staticmethod(gmtime)
|
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