From 095a631718008a1534f7e4b575bef936f5bfe40f Mon Sep 17 00:00:00 2001 From: Brock Date: Mon, 2 Nov 2020 17:28:15 -0800 Subject: [PATCH] CI: troubleshoot win py38 builds --- pandas/_libs/tslibs/tzconversion.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/_libs/tslibs/tzconversion.pyx b/pandas/_libs/tslibs/tzconversion.pyx index 4c62b16d430bd..4a3fac1954ab7 100644 --- a/pandas/_libs/tslibs/tzconversion.pyx +++ b/pandas/_libs/tslibs/tzconversion.pyx @@ -500,9 +500,11 @@ cdef int64_t[:] _tz_convert_from_utc(const int64_t[:] vals, tzinfo tz): return converted +# OSError may be thrown by tzlocal on windows at or close to 1970-01-01 +# see https://github.com/pandas-dev/pandas/pull/37591#issuecomment-720628241 cdef inline int64_t _tzlocal_get_offset_components(int64_t val, tzinfo tz, bint to_utc, - bint *fold=NULL): + bint *fold=NULL) except? -1: """ Calculate offset in nanoseconds needed to convert the i8 representation of a datetime from a tzlocal timezone to UTC, or vice-versa.