MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _attach_tzinfo

Method _attach_tzinfo

lib/matplotlib/dates.py:1002–1007  ·  view source on GitHub ↗
(self, dt, tzinfo)

Source from the content-addressed store, hash-verified

1000 self._rrule = rrule(**self._construct)
1001
1002 def _attach_tzinfo(self, dt, tzinfo):
1003 # pytz zones are attached by "localizing" the datetime
1004 if hasattr(tzinfo, 'localize'):
1005 return tzinfo.localize(dt, is_dst=True)
1006
1007 return dt.replace(tzinfo=tzinfo)
1008
1009 def _aware_return_wrapper(self, f, returns_list=False):
1010 """Decorator function that allows rrule methods to handle tzinfo."""

Callers 1

inner_funcMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected