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

Method set_current_tz

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

Source from the content-addressed store, hash-verified

273 return ctzname
274
275 def set_current_tz(self, tzname):
276 p = subprocess.Popen('tzutil /s "' + tzname + '"')
277
278 out, err = p.communicate()
279
280 if p.returncode:
281 raise OSError('Failed to set current time zone: ' +
282 (err or 'Unknown error.'))
283
284
285###

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected