MobileBlur

times.py at [b2d6f6e2e9]
Login

times.py at [b2d6f6e2e9]

File gluon/contrib/pymysql/times.py artifact 323a9ccf6a part of check-in b2d6f6e2e9


from time import localtime
from datetime import date, datetime, time, timedelta

Date = date
Time = time
TimeDelta = timedelta
Timestamp = datetime

def DateFromTicks(ticks):
    return date(*localtime(ticks)[:3])

def TimeFromTicks(ticks):
    return time(*localtime(ticks)[3:6])

def TimestampFromTicks(ticks):
    return datetime(*localtime(ticks)[:6])