@@ -10587,6 +10587,25 @@ def test_consolidate_datetime64(self):
1058710587 assert_array_equal (df .starting .values , ser_starting .index .values )
1058810588 assert_array_equal (df .ending .values , ser_ending .index .values )
1058910589
10590+ def test_tslib_tz_convert_trans_pos_plus_1__bug (self ):
10591+ """
10592+ Regression test for tslib.tz_convert(vals, tz1, tz2).
10593+ See https://github.com/pydata/pandas/issues/4496 for details.
10594+ """
10595+ idx = pd .date_range (datetime (2011 , 3 , 26 , 23 ), datetime (2011 , 3 , 27 , 1 ), freq = '1min' )
10596+ idx = idx .tz_localize ('UTC' )
10597+ idx = idx .tz_convert ('Europe/Moscow' )
10598+
10599+ test_vector = pd .Series ([3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 ,
10600+ 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 ,
10601+ 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
10602+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
10603+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 5 ], dtype = int )
10604+
10605+ hours = idx .hour
10606+
10607+ np .testing .assert_equal (hours , test_vector .values )
10608+
1059010609 def _check_bool_op (self , name , alternative , frame = None , has_skipna = True ,
1059110610 has_bool_only = False ):
1059210611 if frame is None :
0 commit comments