[Solved]-Django DateTimeField says 'You are 5.5 hours ahead of server time.'

24👍

As you are 5.5 hrs ahead of server time, I am assuming, you are in India.
So put appriopriate timezone in settings.py

TIME_ZONE = ‘Asia/Kolkata’

If somewhere else, set accordingly

4👍

Make sure you make the following change in the settings.py file in your Django project.

Change in settings.py file

3👍

If it is saying that you are 5.5 hours ahead of server time. It means that you are in India then set

TIME_ZONE = 'Asia/Kolkata' 

in your setting.py file.

Or check your time zone at
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

-8👍

You need to change the time zone settings on your PC and refresh. That is the only way out. I just fixed my own through that.

Leave a comment