D
D
DennyD3142016-12-23 01:12:58
Django
DennyD314, 2016-12-23 01:12:58

Why, after adding an object through the django admin panel, the time is written to the database equal to the specified minus 3 hours?

Hello!
I add an object through the admin panel, specify the date and time in the DateTimeField, and save it.
The list displays the created object with the date equal to the current minus 3 hours.
For example: 6fc1539566574d4899f946f6c7c98485.jpg
Perhaps the premise was changing USE_L10N to false, but then I changed it back to true ..
Before that, everything seems to have always been fine.

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2016-12-23
@riky

is your timezone exactly UTC? maybe all the same Europe / Moscow?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question