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

Function set_tzpath

tests/conftest.py:23–38  ·  view source on GitHub ↗

Sets the TZPATH variable if it's specified in an environment variable.

()

Source from the content-addressed store, hash-verified

21
22
23def set_tzpath():
24 """
25 Sets the TZPATH variable if it's specified in an environment variable.
26 """
27 tzpath = os.environ.get('DATEUTIL_TZPATH', None)
28
29 if tzpath is None:
30 return
31
32 path_components = tzpath.split(':')
33
34 print("Setting TZPATH to {}".format(path_components))
35
36 from dateutil import tz
37 tz.TZPATHS.clear()
38 tz.TZPATHS.extend(path_components)
39
40
41set_tzpath()

Callers 1

conftest.pyFile · 0.85

Calls 2

splitMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected