Skip to content

Commit c86b778

Browse files
authored
CI: troubleshoot win py38 builds (#37652)
1 parent 4aa0783 commit c86b778

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/_libs/tslibs/tzconversion.pyx

+3-1
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,11 @@ cdef int64_t[:] _tz_convert_from_utc(const int64_t[:] vals, tzinfo tz):
500500
return converted
501501

502502

503+
# OSError may be thrown by tzlocal on windows at or close to 1970-01-01
504+
# see https://github.com/pandas-dev/pandas/pull/37591#issuecomment-720628241
503505
cdef inline int64_t _tzlocal_get_offset_components(int64_t val, tzinfo tz,
504506
bint to_utc,
505-
bint *fold=NULL):
507+
bint *fold=NULL) except? -1:
506508
"""
507509
Calculate offset in nanoseconds needed to convert the i8 representation of
508510
a datetime from a tzlocal timezone to UTC, or vice-versa.

0 commit comments

Comments
 (0)