Skip to content

[3.6] bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) - #8498

Merged
abalkin merged 1 commit into
python:3.6from
ammaraskar:backport-96d1e69-3.6
Jul 27, 2018
Merged

abalkin merged 1 commit into
python:3.6from
ammaraskar:backport-96d1e69-3.6

Conversation

@ammaraskar

@ammaraskar ammaraskar commented Jul 27, 2018 •

Copy link
Copy Markdown
Member
…alues (pythonGH-2385)

On Windows, passing a negative value to local results in an OSError because localtime_s on Windows does not support negative timestamps. Unfortunately this means that fold detection for timestamps between 0 and max_fold_seconds will result in this OSError since we subtract max_fold_seconds from the timestamp to detect a fold. However, since we know there haven't been any folds in the interval [0, max_fold_seconds) in any timezone, we can hackily just forego fold detection for this time range on Windows..
(cherry picked from commit 96d1e69)

Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants