{{{

2012-02-14, time
>>> import datetime, time
>>> t = time.time()
>>> t
1310630729.994117
>>> dt = datetime.datetime.fromtimestamp(t)
>>> dt
datetime.datetime(2011, 7, 14, 17, 5, 29, 994117)
>>> time.mktime(dt.timetuple())
1310630729.0
>>> import time
>>> start_at = time.time()
>>> elapsed = time.time() - start_at
>>> elapsed
15.295820951461792

この記事は役に立ちましたか?