• Ammar Askar's avatar
    bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) · 96d1e69a
    Ammar Askar yazdı
    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.
    96d1e69a
datetime.py 82.7 KB