File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646from matplotlib .mathtext import MathTextParser
4747from matplotlib .transforms import Affine2D , BboxBase
4848from matplotlib .path import Path
49+ from matplotlib .dates import UTC
4950from matplotlib import _path
5051from matplotlib import _png
5152from matplotlib import ttconv
@@ -136,20 +137,6 @@ def _string_escape(match):
136137 assert False
137138
138139
139- # tzinfo class for UTC
140- class UTCtimezone (tzinfo ):
141- """UTC timezone"""
142-
143- def utcoffset (self , dt ):
144- return timedelta (0 )
145-
146- def tzname (self , dt ):
147- return "UTC"
148-
149- def dst (self , dt ):
150- return timedelta (0 )
151-
152-
153140def pdfRepr (obj ):
154141 """Map Python objects to PDF syntax."""
155142
@@ -492,7 +479,7 @@ def __init__(self, filename):
492479 source_date_epoch = os .getenv ("SOURCE_DATE_EPOCH" )
493480 if source_date_epoch :
494481 source_date = datetime .utcfromtimestamp (int (source_date_epoch ))
495- source_date = source_date .replace (tzinfo = UTCtimezone () )
482+ source_date = source_date .replace (tzinfo = UTC )
496483 else :
497484 source_date = datetime .today ()
498485
You can’t perform that action at this time.
0 commit comments