MCPcopy Create free account
hub / github.com/dateutil/dateutil / gettz

Method gettz

tests/test_tz.py:1418–1425  ·  view source on GitHub ↗
(self, tzname)

Source from the content-addressed store, hash-verified

1416 TZ_LON = 'GMT0BST,M3.5.0,M10.5.0'
1417
1418 def gettz(self, tzname):
1419 # Actual time zone changes are handled by the _gettz_context function
1420 tzname_map = {'Australia/Sydney': self.TZ_AEST,
1421 'America/Toronto': self.TZ_EST,
1422 'America/New_York': self.TZ_EST,
1423 'Europe/London': self.TZ_LON}
1424
1425 return tz.tzstr(tzname_map[tzname])
1426
1427 def testStrStr(self):
1428 # Test that tz.tzstr() won't throw an error if given a str instead

Callers 15

test_parse_tzinfos_foldFunction · 0.45
testStrWithTZIDMethod · 0.45
testStrUntilWithTZMethod · 0.45
test_utils.pyFile · 0.45
testInequalityInvalidMethod · 0.45
testGettzMethod · 0.45
testGetTzEqualityMethod · 0.45
testTimeOnlyGettzMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected