import time def bigintToDateTime(d): return time.localtime(d)
def dateTimeToBigint(d=None): if d==None: d=time.gmtime() return int(time.mktime(d))
def stringToDateTime(s): return time.strptime(s, "%Y-%m-%d %H:%M:%S")
def dateTimeToSting(d): if d==None: d=time.gmtime() return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(d))