We want to get the current time in India in our Django project. In settings.py, UTC is there by default. How do we change it to IST?
check django_timezones! this may help others too it consists of all other timezones for references
Keep TIME_ZONE = 'Asia/Kolkata' in settings.py file and restart the service from where you are accessing the timezone (server or shell). In my case, I restarted the python shell in which I was working and it worked fine for me.
Simple Change TIME ZONE from 'UTC' to 'Asia/Kolkata' remember K and A is Capital here.
Django stores timestamp so if we just change the TIME_ZONE
variable Django will handle rest.
TIME_ZONE = 'Asia/Kolkata'
Modify setting.py and change the time zone to TIME_ZONE = 'Asia/Kolkata'
TIME_ZONE = 'Asia/Kolkata'
USE_I18N = True
USE_L10N = True
USE_TZ = True
The above settings should work