@@ -4627,15 +4627,16 @@ datetime_from_timet_and_us(PyObject *cls, TM_FUNC f, time_t timet, int us,
46274627 /* local timezone requires to compute fold */
46284628 if (tzinfo == Py_None && f == _PyTime_localtime
46294629 /* On Windows, passing a negative value to local results
4630- * in an OSError because localtime_s on Windows does
4631- * not support negative timestamps. Unfortunately this
4632- * means that fold detection for time values between
4633- * 0 and max_fold_seconds will result in an identical
4634- * error since we subtract max_fold_seconds to detect a
4635- * fold. However, since we know there haven't been any
4636- * folds in the interval [0, max_fold_seconds) in any
4637- * timezone, we can hackily just forego fold detection
4638- * for this time range on Windows. */
4630+ * in an OSError because localtime_s on Windows does
4631+ * not support negative timestamps. Unfortunately this
4632+ * means that fold detection for time values between
4633+ * 0 and max_fold_seconds will result in an identical
4634+ * error since we subtract max_fold_seconds to detect a
4635+ * fold. However, since we know there haven't been any
4636+ * folds in the interval [0, max_fold_seconds) in any
4637+ * timezone, we can hackily just forego fold detection
4638+ * for this time range.
4639+ */
46394640#ifdef MS_WINDOWS
46404641 && (timet - max_fold_seconds > 0 )
46414642#endif
0 commit comments