Artifact 323a9ccf6acef9ee5f7df45e628de8437149e67e:
- File gluon/contrib/pymysql/times.py — part of check-in [5e6e1e2c0a] at 2011-11-20 05:28:20 on branch feature/web2py_auth — Upgraded to web2py 1.99.2 (user: spiffy, size: 357) [annotate] [blame] [check-ins using] [more...]
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])