[issue12750] datetime.strftime('%s') should respect tzinfo

Alexander Belopolsky report at bugs.python.org
Wed Aug 17 05:12:26 CEST 2011


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

> it would appear the problem lies with strftime()

Yes, strftime('%s') ignores tzinfo at the moment.  This is not a bug. Support for '%s' format code is incidental and not documented in Python.

Nevertheless I think this is a good feature request.  I am changing the title to make it more explicit.

----------
components: +Extension Modules
keywords: +easy
stage: committed/rejected -> needs patch
title: datetime.datetime how to correctly attach a timezone to an existing naive datetime -> datetime.strftime('%s') should respect tzinfo
versions:  -Python 2.7, Python 3.2

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


More information about the Python-bugs-list mailing list