Issue 19583: time.strftime fails to use %:z time formatter of the underlying C library (original) (raw)

Issue19583

Created on 2013-11-14 14:51 by deronnax, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg202845 - (view) Author: Mathieu Dupuy (deronnax) * Date: 2013-11-14 14:51
function time.strftime fails to use '%:z' time formatter of the underlying library. Passing it does not format time accordingly but returns it as if it was a non-formatting string. Simple reproduction, on Linux: $ date +%:z +01:00 $ python -c 'import time;print time.strftime("%:z")' %:z %z works fine, any of the other middle-colon variant (glibc also have %::z, %:::z) have the same problem. Reproduced with python 2.7 and 3.3
msg202847 - (view) Author: Mathieu Dupuy (deronnax) * Date: 2013-11-14 15:17
But in fact "date" was not the right reference to look at, C strftime has exactly the same behaviour than python, so I'm marking this bug as invalid and closing it.
msg202848 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-14 15:17
According to Mathieu on IRC, it's not a bug: date behaves differently than the C function strftime().
History
Date User Action Args
2022-04-11 14:57:53 admin set github: 63782
2013-11-14 15:17:51 vstinner set nosy: + vstinnermessages: +
2013-11-14 15:17:49 deronnax set status: open -> closedresolution: not a bugmessages: +
2013-11-14 14:51:55 deronnax create