1

I have the Local Time Zone, for example: Europe/Zurich How can I set it in Windows 7 with Python ? I know it's possible with tzutil in CMD.

user3083199
  • 45
  • 1
  • 5
  • Possible duplicate of [Python module to change system date and time](https://stackoverflow.com/questions/12081310/python-module-to-change-system-date-and-time) – Cristian Ciupitu Jul 19 '17 at 19:38

1 Answers1

1

You need to use Popen from the subprocess module. An example (Windows 7, opening a cmd prompt)

>>> from subprocess import Popen
>>> Popen("start", shell=True)
<subprocess.Popen object at 0x02C199F0>

So, accordingly, you can execute your timezone commands in the prompt, through Python. (I could have given the full code, but apparently, that behavior is not good on SO (since you did not attempt the problem yourself).

shad0w_wa1k3r
  • 12,955
  • 8
  • 67
  • 90
  • Thank you, but It's not possible to set timezone with the local time, How can I covert the Europe/Zurich time to "Central European Time". Moreover, in order to change timezone with CMD you need privilege, how is it possible to run cmd with high privilege ? – user3083199 Dec 09 '13 at 15:04
  • @user3083199 Check the comments in here to *run as admin* http://stackoverflow.com/questions/18356353/run-cmd-with-os-system-as-administrator – shad0w_wa1k3r Dec 09 '13 at 15:10