Issue 4086: support %z format in time.strftime and _strptime?
Issue4086
Created on 2008-10-09 11:27 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg74570 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2008-10-09 11:27 | |
While responding to a c.l.py question just now I discovered that numeric timezone offsets don't appear to be supported by either the time.strftime function or the _strptime module. I noticed on my Mac's strftime(3) man page that it supports a %Z format for TZ names and a %z format for numeric tz offsets. It seems Python should as well. |
|||
| msg118701 - (view) | Author: Alexander Belopolsky (belopolsky) * ![]() |
Date: 2010-10-14 17:54 | |
Closing as a duplicate of (closed) issue 6641. time.strftime appears to support %z on the platforms that support it in C strftime: >>> time.strftime("%z", time.localtime()) '-0400' |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:40 | admin | set | github: 48336 |
| 2010-10-15 17:54:36 | georg.brandl | set | status: open -> closed |
| 2010-10-14 17:54:47 | belopolsky | set | resolution: duplicate dependencies: - No obvious and correct way to get the time zone offset superseder: datetime.strptime doesn't support %z format ? messages: + msg118701 |
| 2010-08-07 18:13:21 | terry.reedy | set | versions: + Python 3.2, - Python 2.6 |
| 2010-06-12 06:05:57 | belopolsky | set | assignee: belopolsky dependencies: + No obvious and correct way to get the time zone offset nosy: + belopolsky |
| 2010-05-20 20:34:05 | skip.montanaro | set | nosy:
- skip.montanaro -> (no value) |
| 2008-10-09 11:27:25 | skip.montanaro | create | |

