Is it possible with Python to set the timezone just like this in PHP:
date_default_timezone_set(\"Europe/London\");
$Year = date(\'y\');
$Month = date(\'m\')
For windows you can use:
Running Windows command prompt commands in python.
import os
os.system('tzutil /s "Central Standard Time"')
In windows command prompt try:
This gives current timezone:
tzutil /g
This gives a list of timezones:
tzutil /l
This will set the timezone:
tzutil /s "Central America Standard Time"
For further reference: http://woshub.com/how-to-set-timezone-from-command-prompt-in-windows/