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
- [Answer]-Django-how to implement javascript for the Save button in Html to help redirect to a new url
- [Answer]-Python/Django โ Connecting to a legacy SQL Server Databse getting error "AttributeError: 'module' object has no attribute 'sqlserver_ado'"
Source:stackexchange.com