timedelta comparision with gmtime()

wittempj@hotmail.com martin.witte at gmail.com
Wed Jun 22 14:24:01 EDT 2005


martin at ubuntu:~ $ python
Use now() from datetime class of datetime module instead of time
module.

Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
py> import datetime
py> t = datetime.datetime.now()
py> print t
2005-06-22 20:22:36.212142
py> d = datetime.timedelta(minutes = 2)
py> print t + d
2005-06-22 20:24:36.212142




More information about the Python-list mailing list