MCPcopy Index your code
hub / github.com/kubernetes-client/python / TimezoneInfo

Class TimezoneInfo

kubernetes/base/config/dateutil.py:20–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class TimezoneInfo(datetime.tzinfo):
21 def __init__(self, h, m):
22 self._name = "UTC"
23 if h != 0 and m != 0:
24 self._name += "%+03d:%2d" % (h, m)
25 self._delta = datetime.timedelta(hours=h, minutes=math.copysign(m, h))
26
27 def utcoffset(self, dt):
28 return self._delta
29
30 def tzname(self, dt):
31 return self._name
32
33 def dst(self, dt):
34 return datetime.timedelta(0)
35
36
37UTC = TimezoneInfo(0, 0)

Callers 3

test_format_rfc3339Method · 0.70
dateutil.pyFile · 0.70
parse_rfc3339Function · 0.70

Calls

no outgoing calls

Tested by 1

test_format_rfc3339Method · 0.56