Skip to content

Commit 85767af

Browse files
committed
DOC: reword bugfix comment
1 parent 322178c commit 85767af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/_libs/tslibs/conversion.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ cdef _TSObject convert_datetime_to_tsobject(datetime ts, object tz,
362362
obj.tzinfo = tz
363363
else:
364364
obj.value = pydatetime_to_dt64(ts, &obj.dts)
365-
# GH 24329 Take DST offset into account
365+
# GH 24329 When datetime is ambiguous,
366366
# pydatetime_to_dt64 doesn't take DST into account
367-
# but get_utcoffset does. dateutil assumes DST
368-
# when time is ambiguous, so we need to correct for it
367+
# but with dateutil timezone, get_utcoffset does
368+
# so we need to correct for it
369369
if treat_tz_as_dateutil(ts.tzinfo):
370370
if ts.tzinfo.is_ambiguous(ts):
371371
dst_offset = ts.tzinfo.dst(ts)

0 commit comments

Comments
 (0)