Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da509ae

Browse files
committed
DOC: remove dateutil
1 parent 7057ddf commit da509ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/ticks_and_spines/date_precision_and_epochs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
1919
"""
2020
import datetime
21-
import dateutil
2221
import numpy as np
2322

2423
import matplotlib
@@ -49,7 +48,7 @@ def _reset_epoch_for_tutorial():
4948
mdates.set_epoch(old_epoch) # old epoch (pre MPL 3.3)
5049

5150
date1 = datetime.datetime(2000, 1, 1, 0, 10, 0, 12,
52-
tzinfo=dateutil.tz.gettz('UTC'))
51+
tzinfo=datetime.timezone.utc)
5352
mdate1 = mdates.date2num(date1)
5453
print('Before Roundtrip: ', date1, 'Matplotlib date:', mdate1)
5554
date2 = mdates.num2date(mdate1)
@@ -60,7 +59,7 @@ def _reset_epoch_for_tutorial():
6059
# dates closer to the old epoch:
6160

6261
date1 = datetime.datetime(10, 1, 1, 0, 10, 0, 12,
63-
tzinfo=dateutil.tz.gettz('UTC'))
62+
tzinfo=datetime.timezone.utc)
6463
mdate1 = mdates.date2num(date1)
6564
print('Before Roundtrip: ', date1, 'Matplotlib date:', mdate1)
6665
date2 = mdates.num2date(mdate1)
@@ -85,7 +84,7 @@ def _reset_epoch_for_tutorial():
8584
mdates.set_epoch(new_epoch)
8685

8786
date1 = datetime.datetime(2020, 1, 1, 0, 10, 0, 12,
88-
tzinfo=dateutil.tz.gettz('UTC'))
87+
tzinfo=datetime.timezone.utc)
8988
mdate1 = mdates.date2num(date1)
9089
print('Before Roundtrip: ', date1, 'Matplotlib date:', mdate1)
9190
date2 = mdates.num2date(mdate1)

0 commit comments

Comments
 (0)