Skip to content

Commit c7a2cf2

Browse files
authored
Merge pull request matplotlib#31783 from meeseeksmachine/auto-backport-of-pr-31780-on-v3.11.x
Backport PR matplotlib#31780 on branch v3.11.x (Update timezone test to only use past dates)
2 parents 9cfa2e4 + a2f4259 commit c7a2cf2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/matplotlib/tests/test_dates.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,13 @@ def _create_auto_date_locator(date1, date2, tz):
890890
locator.axis.set_view_interval(*mdates.date2num([date1, date2]))
891891
return locator
892892

893-
results = ([datetime.timedelta(weeks=52*200),
894-
['1980-01-01 00:00:00-08:00', '2000-01-01 00:00:00-08:00',
895-
'2020-01-01 00:00:00-08:00', '2040-01-01 00:00:00-08:00',
896-
'2060-01-01 00:00:00-08:00', '2080-01-01 00:00:00-08:00',
897-
'2100-01-01 00:00:00-08:00', '2120-01-01 00:00:00-08:00',
898-
'2140-01-01 00:00:00-08:00', '2160-01-01 00:00:00-08:00',
899-
'2180-01-01 00:00:00-08:00', '2200-01-01 00:00:00-08:00']
893+
results = ([datetime.timedelta(weeks=52*20),
894+
['1996-01-01 00:00:00-08:00', '1998-01-01 00:00:00-08:00',
895+
'2000-01-01 00:00:00-08:00', '2002-01-01 00:00:00-08:00',
896+
'2004-01-01 00:00:00-08:00', '2006-01-01 00:00:00-08:00',
897+
'2008-01-01 00:00:00-08:00', '2010-01-01 00:00:00-08:00',
898+
'2012-01-01 00:00:00-08:00', '2014-01-01 00:00:00-08:00',
899+
'2016-01-01 00:00:00-08:00']
900900
],
901901
[datetime.timedelta(weeks=52),
902902
['1997-01-01 00:00:00-08:00', '1997-02-01 00:00:00-08:00',

0 commit comments

Comments
 (0)