I have a Timezone in the following format: country/city (for example: America/Sao_Paulo). I want to change with python my system's timezone (Win7) with it, is it possible to do it with Pytz and Datetime, or at all ?
Thank you !
In general, no. There is not a direct Python way to do this.
It could be done, but you would have to jump through a lot of hoops:
America/Sao_Paulo
=> E. South America Standard Time
SetTimeZone
APICaling Win32 functions from Python is done via ctypes
.
Here's a walkthrough of which Win32 permissions and calls to make, although it's in C# in this sample. You will need to translate for Python.
Sounds like a lot of work to me. Not sure why you would want to do this.