In Java, we can set the default time zone by -Duser.timezone=GMT+8
.
How can I set the default timezone in python?
In Java, we can set the default time zone by -Duser.timezone=GMT+8
.
How can I set the default timezone in python?
You can use this at the start of your code:
import os
os.system("tzutil /s \"Central Standard Time\"");
This also changes your system's time, so make sure to changeit when finished. Don't know if this will help.