예제 #1
0
파일: p43.py 프로젝트: muthulatha/iem
def tsfmt(x, pos):
    dt = mdates._from_ordinalf(x)
    dt = dt.astimezone(mytz)
    if dt.hour == 0:
        fmt = "%-I %p\n%-d %b"
    else:
        fmt = "%-I %p"
    return dt.strftime(fmt)
예제 #2
0
def tsfmt(x, pos):
    """Timestamp formatter"""
    dt = mdates._from_ordinalf(x)
    dt = dt.astimezone(mytz)
    if dt.hour == 0:
        fmt = "%-I %p\n%-d %b"
    else:
        fmt = "%-I %p"
    return dt.strftime(fmt)
예제 #3
0
파일: DatePlot.py 프로젝트: kagelump/calsol
def from_ordinal(x):
    return mdates._from_ordinalf(x).astimezone(utc).replace(tzinfo=None)