We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9044f8 commit 944dad6Copy full SHA for 944dad6
pandas/tests/scalar/timestamp/test_arithmetic.py
@@ -141,6 +141,16 @@ def test_subtracting_involving_datetime_with_different_tz(self):
141
assert isinstance(result, Timedelta)
142
assert result == Timedelta("-1 days +18:00:00")
143
144
+ def test_subtracting_different_timezones(self, tz_aware_fixture):
145
+ t_raw = Timestamp("20130101")
146
+ t_UTC = t_raw.tz_localize("UTC")
147
+ t_diff = t_UTC.tz_convert(tz_aware_fixture) + Timedelta("0 days 05:00:00")
148
+
149
+ result = t_diff - t_UTC
150
151
+ assert isinstance(result, Timedelta)
152
+ assert result == Timedelta("0 days 05:00:00")
153
154
def test_addition_subtraction_types(self):
155
# Assert on the types resulting from Timestamp +/- various date/time
156
# objects
0 commit comments