@@ -738,6 +738,28 @@ def test_dti_drop_dont_lose_tz(self):
738
738
739
739
assert ind .tz is not None
740
740
741
+ def test_drop_dst_boundary (self ):
742
+ # see gh-18031
743
+ tz = "Europe/Brussels"
744
+ freq = "15min"
745
+
746
+ start = pd .Timestamp ("201710290100" , tz = tz )
747
+ end = pd .Timestamp ("201710290300" , tz = tz )
748
+ index = pd .date_range (start = start , end = end , freq = freq )
749
+
750
+ expected = DatetimeIndex (["201710290115" , "201710290130" ,
751
+ "201710290145" , "201710290200" ,
752
+ "201710290215" , "201710290230" ,
753
+ "201710290245" , "201710290200" ,
754
+ "201710290215" , "201710290230" ,
755
+ "201710290245" , "201710290300" ],
756
+ tz = tz , freq = freq ,
757
+ ambiguous = [True , True , True , True ,
758
+ True , True , True , False ,
759
+ False , False , False , False ])
760
+ result = index .drop (index [0 ])
761
+ tm .assert_index_equal (result , expected )
762
+
741
763
def test_date_range_localize (self ):
742
764
rng = date_range ('3/11/2012 03:00' , periods = 15 , freq = 'H' ,
743
765
tz = 'US/Eastern' )
0 commit comments