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:
- Use CLDR data to translate the IANA zone to a Windows zone id.
- Ex.
America/Sao_Paulo
=>E. South America Standard Time
- (See the Databases section of the timezone tag wiki for more details.)
- Ex.
- Get the appropriate Win32 security permissions.
- Call into the Win32
SetTimeZone
API
Caling 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.