From b6d50c1dea9bf2d6c37fdc595d7f9f0fd0e2cbc3 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 7 Oct 2011 15:14:34 -0400 Subject: [PATCH] ENH: Added localtime() to MyTime --- server/mytime.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/mytime.py b/server/mytime.py index b6762c4f..6bb38f85 100644 --- a/server/mytime.py +++ b/server/mytime.py @@ -76,4 +76,10 @@ class MyTime: else: return time.gmtime(MyTime.myTime) gmtime = staticmethod(gmtime) - \ No newline at end of file + + 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)