MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / fromutc

Method fromutc

tests/test_code/py/pytz/tzinfo.py:82–86  ·  view source on GitHub ↗

See datetime.tzinfo.fromutc

(self, dt)

Source from the content-addressed store, hash-verified

80 offset at some point in their history
81 '''
82 def fromutc(self, dt):
83 '''See datetime.tzinfo.fromutc'''
84 if dt.tzinfo is not None and dt.tzinfo is not self:
85 raise ValueError('fromutc: dt.tzinfo is not self')
86 return (dt + self._utcoffset).replace(tzinfo=self)
87
88 def utcoffset(self, dt, is_dst=None):
89 '''See datetime.tzinfo.utcoffset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected