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

Class FixedOffset

tests/test_code/py/pytz/reference.py:25–39  ·  view source on GitHub ↗

Fixed offset in minutes east from UTC.

Source from the content-addressed store, hash-verified

23# Note that FixedOffset(0, "UTC") is a different way to build a
24# UTC tzinfo object.
25class FixedOffset(tzinfo):
26 """Fixed offset in minutes east from UTC."""
27
28 def __init__(self, offset, name):
29 self.__offset = timedelta(minutes=offset)
30 self.__name = name
31
32 def utcoffset(self, dt):
33 return self.__offset
34
35 def tzname(self, dt):
36 return self.__name
37
38 def dst(self, dt):
39 return ZERO
40
41
42import time as _time

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected