import calendar, datetime

def dt(u):
    return datetime.datetime.utcfromtimestamp(u)

def ut(d):
    pass
Convert a unixtime to a datetime object and back again (pair of time conversion functions that are inverses)