We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b482f1b commit 36f00e4Copy full SHA for 36f00e4
pandas/src/datetime.pyx
@@ -584,8 +584,8 @@ cpdef convert_to_tsobject(object ts, object tz=None):
584
obj.value = _pydatetime_to_dts(ts, &obj.dts)
585
obj.tzinfo = ts.tzinfo
586
if obj.tzinfo is not None and not _is_utc(obj.tzinfo):
587
- offset = _get_utcoffset(obj.tzinfo, obj)
588
- obj.value -= _delta_to_nanoseconds()
+ offset = _get_utcoffset(obj.tzinfo, ts)
+ obj.value -= _delta_to_nanoseconds(offset)
589
_check_dts_bounds(obj.value, &obj.dts)
590
return obj
591
elif PyDate_Check(ts):
0 commit comments