ISO with timezone

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Jan 29 17:50:06 EST 2008


En Tue, 29 Jan 2008 16:56:18 -0200, nik <nikbaer at gmail.com> escribi�:

>>>> print datetime(2008,2,29,15,30,11,tzinfo=TZ()).isoformat()
> 2008-02-29T15:30:11+8:00
>
> But what I want to know now it how to get the actual time into the
> expression instead of typing the 2008,2,29,15....
> So something like: >>> print
> datetime(time.gmtime(),tzinfo=TZ()).isoformat(), but that doesn't
> work.

Are you looking for datetime.now()?

-- 
Gabriel Genellina




More information about the Python-list mailing list