Django timezone mess

I am working on a localized Django application with a simple forum. The timestamps of some messages are displayed as if they were posted 7 hours earlier. What is strange is that this happens to some users, sometimes (the user can publish once, and he is fine, the message is wrong again).

settings.py:

TIME_ZONE = 'Europe/Prague'
LANGUAGES =  ( ('cs-cz', _('Czech')), )
DATABASE_ENGINE = 'sqlite3'

Model:

class Post(models.Model):
    created = models.DateTimeField(auto_now_add=True)

Running on Apache with mod_wsgi.

+3
source share
1 answer

As indicated in another post, you quote:

http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone%5Fand%5FLocale%5FSettings

, , , . , TZ . - , .

- mod_wsgi - Python, . , .

+6

Source: https://habr.com/ru/post/1718540/


All Articles