MCPcopy Index your code
hub / github.com/python/cpython / tzname

Method tzname

Lib/_pydatetime.py:2232–2243  ·  view source on GitHub ↗

Return the timezone name. Note that the name is 100% informational -- there's no requirement that it mean anything in particular. For example, "GMT", "UTC", "-500", "-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.

(self)

Source from the content-addressed store, hash-verified

2230 return offset
2231
2232 def tzname(self):
2233 """Return the timezone name.
2234
2235 Note that the name is 100% informational -- there's no requirement that
2236 it mean anything in particular. For example, "GMT", "UTC", "-500",
2237 "-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.
2238 """
2239 if self._tzinfo is None:
2240 return None
2241 name = self._tzinfo.tzname(self)
2242 _check_tzname(name)
2243 return name
2244
2245 def dst(self):
2246 """Return 0 if DST is not in effect, or the DST offset (as timedelta

Callers

nothing calls this directly

Calls 2

_check_tznameFunction · 0.85
tznameMethod · 0.45

Tested by

no test coverage detected