[issue22994] datetime buggy

Simeon Visser report at bugs.python.org
Thu Dec 4 11:59:10 CET 2014


Simeon Visser added the comment:

Datetimes in local timezones should be created using localize():

>>> zon.localize(datetime.datetime(2015, 2, 1)).isoformat()
'2015-02-01T00:00:00-08:00'

See the two supported methods of creating local datetimes at: http://pytz.sourceforge.net

----------
nosy: +simeon.visser

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22994>
_______________________________________


More information about the Python-bugs-list mailing list