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.

classification
Title: Do not call localtime (gmtime) in datetime module
Type: behavior Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, mark.dickinson, python-dev
Priority: normal Keywords: patch

Created on 2016-09-10 19:13 by belopolsky, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue28067.diff belopolsky, 2016-09-10 19:43 review
Messages (6)
msg275678 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2016-09-10 19:13
POSIX localtime function mutates global state which leads to subtle bugs on some platforms.  We should call localtime_r or localtime_s instead.

See issue 22627.
msg275689 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 19:58
New changeset 8a504694d92f by Alexander Belopolsky in branch 'default':
Closes #28067: Do not call localtime (gmtime) in datetime module.
https://hg.python.org/cpython/rev/8a504694d92f
msg275690 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2016-09-10 20:02
What is gmime_s?
msg275691 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2016-09-10 20:06
> What is gmime_s?

A typo.  Should be gmtime_s.
msg275692 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 20:08
New changeset 5bdfe132e4ed by Alexander Belopolsky in branch 'default':
#28067: Fixed a typo.
https://hg.python.org/cpython/rev/5bdfe132e4ed
msg275695 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 20:51
New changeset c7e477fa9e09 by Alexander Belopolsky in branch 'default':
#28067: Fixed another typo.
https://hg.python.org/cpython/rev/c7e477fa9e09
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72254
2016-09-10 20:51:22python-devsetmessages: + msg275695
2016-09-10 20:08:30python-devsetmessages: + msg275692
2016-09-10 20:06:15belopolskysetmessages: + msg275691
2016-09-10 20:02:55mark.dickinsonsetnosy: + mark.dickinson
messages: + msg275690
2016-09-10 19:58:35python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg275689

resolution: fixed
stage: commit review -> resolved
2016-09-10 19:57:24belopolskysettitle: Do not call localtime in datetime module -> Do not call localtime (gmtime) in datetime module
2016-09-10 19:43:19belopolskysetfiles: + issue28067.diff
keywords: + patch
stage: commit review
2016-09-10 19:39:45belopolskylinkissue22627 superseder
2016-09-10 19:13:49belopolskycreate