mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-04 14:48:08 +00:00
ENH: Added localtime() to MyTime
This commit is contained in:
parent
5a2d518bf2
commit
b6d50c1dea
1 changed files with 7 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue