Question

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.

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top