def NowISOlongMS(seps=False, sep=False, T=False): return UTCUT2localISOlongMS(utctime(), seps, sep, T)
def NowISOlong(seps=False, T=False): return UTCUT2localISOlong(utctime(), seps, T)
def _generate_auth_token(user_id): data = (userId, utctime()) pickled_data = dumps(data) pickled_md5 = md5(pickled_data + SECRET_KEY).hexdigest() return encodestring(pickled + pickled_md5)
1/1 jd = StartOfMonthJD(YYMMDD2JD('130402')) ymd = JD2YYMMDD(jd, '-') jd = EndOfMonthJD(YYMMDD2JD('130429')) ymd = JD2YYMMDD(jd, '-') 1/1 jd = StartOfMonthJD(YYMMDD2JD('131202')) ymd = JD2YYMMDD(jd, '-') jd = EndOfMonthJD(YYMMDD2JD('131230')) ymd = JD2YYMMDD(jd, '-') if False: 1/1 s = NowISOlong(True) s = s z = utctime() z = z s = str2ISOymdhms(gmtime(z), seps=False, T=True) s = s s = str2ISOymdhms(gmtime(z), seps=False, T=False) s = s s = str2ISOymdhms(gmtime(z), seps=True, T=True) s = s s = str2ISOymdhms(gmtime(z), seps=True, T=False) s = s s = UT2ISOlong(z, True, False) s = s s = UT2ISOlongDS(z, True, True, False) s = s s = UT2ISOlongCS(z, True, True, False) s = s
#!/usr/bin/python # three popular time-related module in Python import time import datetime import calendar time.timestamp() # timestamp, time in second since 1970.1.1 time.localtime() time.utctime() datetime.time() # time of h:m:s datetime.date() # Y:M:D datetime.datetime() # combination of above two