class_docstr: Context manager for changing local time zone on Windows.
  
  Because the effect of this is system-wide and global, it may have
  unintended side effect. Set the ``DATEUTIL_MAY_CHANGE_TZ`` environment
  variable to a truthy value before using this context manager.
class_docstr_tok: ["Context","manager","for","changing","local","time","zone","on","Windows",".","Because","the","effect","of","this","is","system-wide","and","global",",","it","may","have","unintended","side","effect",".","Set","the","``","DATEUTIL_MAY_CHANGE_TZ","``","environment","variable","to","a","truthy","value","before","using","this","context","manager","."]
code: def set_current_tz(self, tzname):
      p = subprocess.Popen('tzutil /s "' + tzname + '"')
  
      out, err = p.communicate()
  
      if p.returncode:
          raise OSError(
              "Failed to set current time zone: "
              + (err or "Unknown error.")
          )
  
imports: from __future__ import unicode_literals
  import os
  import time
  import subprocess
  import warnings
  import tempfile
  import pickle
  import pytest
label_desc: Use image node_id 2 for calling the TZWinContext obj's underlying member method code with example usage: obj.set_current_tz(tzname) without return types