Skip to content

Commit 10024cd

Browse files
authored
REF: standardize tz_convert_single usage (#35102)
1 parent 9fcebee commit 10024cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/_libs/tslibs/timestamps.pyx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ default 'raise'
13801380

13811381
cdef:
13821382
npy_datetimestruct dts
1383-
int64_t value, value_tz
1383+
int64_t value
13841384
object k, v
13851385
datetime ts_input
13861386
tzinfo_type tzobj
@@ -1389,8 +1389,7 @@ default 'raise'
13891389
tzobj = self.tzinfo
13901390
value = self.value
13911391
if tzobj is not None:
1392-
value_tz = tz_convert_single(value, tzobj, UTC)
1393-
value += value - value_tz
1392+
value = tz_convert_single(value, UTC, tzobj)
13941393

13951394
# setup components
13961395
dt64_to_dtstruct(value, &dts)

0 commit comments

Comments
 (0)