Example #1
0
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)
Example #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)
Example #3
0
def from_ordinal(x):
    return mdates._from_ordinalf(x).astimezone(utc).replace(tzinfo=None)