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

Method set_current_tz

tests/_common.py:155–162  ·  view source on GitHub ↗
(self, tzname)

Source from the content-addressed store, hash-verified

153 return ctzname
154
155 def set_current_tz(self, tzname):
156 p = subprocess.Popen('tzutil /s "' + tzname + '"')
157
158 out, err = p.communicate()
159
160 if p.returncode:
161 raise OSError('Failed to set current time zone: ' +
162 (err or 'Unknown error.'))
163
164
165###

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected