Simplest solution for formatting local time in iso 8601 including time zone.
clp at rebertia.com
Wed Sep 10 06:40:57 CEST 2008
On Tue, Sep 9, 2008 at 9:32 PM, <rowland at river2sea.org> wrote:
> What's the simplest solution for formatting the output of local time
> in iso 8601 including the time zone information?
You want the isoformat() method of datetime objects.
See http://docs.python.org/lib/datetime-datetime.html for details.
You'll need to pass 'T' as the separator to isoformat() and pass in a
tzinfo object when constructing the datetime object.
Follow the path of the Iguana...
More information about the Python-list