ENH: Added localtime() to MyTime

pull/4/head
Yaroslav Halchenko 2011-10-07 15:14:34 -04:00
parent 5a2d518bf2
commit b6d50c1dea
1 changed files with 7 additions and 1 deletions

View File

@ -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)