This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年12月05日 23:57 by ericpruitt, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg123442 - (view) | Author: Eric Pruitt (ericpruitt) * | Date: 2010年12月05日 23:57 | |
If the current time zone changes on Windows, time.localtime will continue to return results that reflect the time zone the system used when the module was imported. My current work around is to use GetLocalTime from kernel32 with ctypes. Windows does not have a tzset() equivalent as it does in Linux, but it seems like modifying time.localtime to use GetLocalTime on Windows systems could make up for this shortcoming. |
|||
| msg123446 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2010年12月06日 00:25 | |
This is not a bug in Python, but in the Microsoft CRT. Rewriting Python to not use the CRT anymore for this is non-trivial, in particular as the semantics of environment variables (TZ) needs to be considered. |
|||
| msg123472 - (view) | Author: Eric Pruitt (ericpruitt) * | Date: 2010年12月06日 15:55 | |
Is there a way to force the time module to be reinitialized? I had no success experimenting with reload and del, but I assume that has something to do with the module being CRT based. |
|||
| msg123487 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2010年12月06日 18:41 | |
What needs reinitialization is not the time module, but the CRT. This is not possible without starting a completely new process. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:09 | admin | set | github: 54843 |
| 2010年12月13日 17:48:22 | r.david.murray | set | resolution: not a bug stage: test needed -> resolved |
| 2010年12月12日 19:37:14 | ericpruitt | set | status: open -> closed |
| 2010年12月06日 18:41:37 | loewis | set | messages: + msg123487 |
| 2010年12月06日 15:55:37 | ericpruitt | set | messages: + msg123472 |
| 2010年12月06日 15:43:20 | brian.curtin | set | nosy:
+ brian.curtin |
| 2010年12月06日 00:25:54 | loewis | set | nosy:
+ loewis messages: + msg123446 |
| 2010年12月05日 23:58:33 | brian.curtin | set | stage: test needed components: + Library (Lib) versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 2.5 |
| 2010年12月05日 23:57:22 | ericpruitt | create | |