[Answer]-While Inserting Time in to mysql database through django it stores different time

1๐Ÿ‘

โœ…

If you are using Django 1.4+ with USE_TZ=True the datetimes are converted to UTC when they are passed to MySQL. When they are retrieved back, Django converts these datetimes to the timezone in use.

If you want to store local times (usually not a good idea) you can turn off timezone management: USE_TZ=False.

If you want to store TZ information on DB, you will have to switch to PostgreSQL.

Django and timezones documentation:
https://docs.djangoproject.com/en/dev/topics/i18n/timezones/

๐Ÿ‘คAJJ

0๐Ÿ‘

Did you change TimeZone in settings.py file?

๐Ÿ‘คbognix

Leave a comment