Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions pandas/tests/indexes/datetimes/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,28 @@ def test_dti_drop_dont_lose_tz(self):

assert ind.tz is not None

def test_drop_dst_boundary(self):
# see gh-18031
tz = "Europe/Brussels"
freq = "15min"

start = pd.Timestamp("201710290100", tz=tz)
end = pd.Timestamp("201710290300", tz=tz)
index = pd.date_range(start=start, end=end, freq=freq)

expected = DatetimeIndex(["201710290115", "201710290130",
"201710290145", "201710290200",
"201710290215", "201710290230",
"201710290245", "201710290200",
"201710290215", "201710290230",
"201710290245", "201710290300"],
tz=tz, freq=freq,
ambiguous=[True, True, True, True,
True, True, True, False,
False, False, False, False])
result = index.drop(index[0])
tm.assert_index_equal(result, expected)

def test_date_range_localize(self):
rng = date_range('3/11/2012 03:00', periods=15, freq='H',
tz='US/Eastern')
Expand Down