示例#1
0
文件: l_dt2.py 项目: kdresser/plib2
def UTCUT2localYYYYMMDD(UT):
    loc = loctime(floor(UT))
    return '%04d%02d%02d' % (loc.tm_year, loc.tm_mon, loc.tm_mday)
示例#2
0
文件: l_dt2.py 项目: kdresser/plib2
def UTCUT2localISOlongMS(UT, seps=False, sep=False, T=False):
    """UTC Unix time to local time to ISO long form, with milliseconds."""
    fUT, iUT = modf(UT)
    str = loctime(iUT)
    return '%s%s%s' % (str2ISOymdhms(str, seps, T), (',' if sep else ''), ('%.03f' % fUT)[-3:])
    '''...
示例#3
0
文件: l_dt2.py 项目: kdresser/plib2
def UTCUT2localISOlong(UT, seps=False, T=False):
    """UTC Unix time to local time to ISO long form."""
    ###str = loctime(floor(UT+0.5))
    str = loctime(floor(UT))
    return str2ISOymdhms(str, seps, T)
    '''...