[issue24517] %z does not work in time.strftime()
R. David Murray added the comment: Yes, but the Microsoft C runtime doesn't use that interface, and it is currently the C runtime that we use to implement strftime. This could change, but that's an enhancement. See issue 3173 for example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24517] %z does not work in time.strftime()
New submission from dendory: Using `%z` gives the same result as using `%Z` in `time.strftime()`: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import time time.strftime(%z) 'Eastern Daylight Time' time.strftime(%Z) 'Eastern Daylight Time' Instead it's supposed to give a + or - result. -- messages: 245860 nosy: dendory priority: normal severity: normal status: open title: %z does not work in time.strftime() versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24517] %z does not work in time.strftime()
R. David Murray added the comment: That's a platform peculiarity. See issue 20281. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: - time.strftime %z format specifier is the same as %Z ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24517] %z does not work in time.strftime()
dendory added the comment: Uh? But that's completely besides the point. Windows provides timezone offset information in a different way than Linux does (through the Registry) but it's still available. It's trivial to do in .NET for example: Console.WriteLine(TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now)); Aren't a lot of things implemented differently in Linux and Windows? I'm not familiar with Python's internals, but I'm sure a lot of functions are implemented differently cross platform. This bug is certainly valid, as any code using this function will not work as expected on this platform. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com