Re: [Django] #33810: Admin "now" time is incorrect

41 views
Skip to first unread message

Django

unread,
Jun 28, 2022, 4:51:26 AM6/28/22
to django-...@googlegroups.com
#33810: Admin "now" time is incorrect
-------------------------------+--------------------------------------
Reporter: Michael | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):

* resolution: needsinfo => worksforme


Comment:

This looks like a configuration error. As far as I can see everything is
working as expected.

> `You are 7 hours ahead of server time.`

The default `TIME_ZONE` is `'America/Chicago'`, which is GMT-5.
`'Africa/Johannesburg'` is (as you say) GMT+2, so there's your 7. Best
guess is that your settings aren't applied as you think they are.

However, without more detail it's impossible to say if there's a deeper
error.

If you can create a sample project that demonstrates an issue, then we can
have a look, but short of that, there's nothing we can say.

--
Ticket URL: <https://code.djangoproject.com/ticket/33810#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 28, 2022, 5:57:07 AM6/28/22
to django-...@googlegroups.com
#33810: Admin "now" time is incorrect
-------------------------------+--------------------------------------
Reporter: Michael | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Michael):

Replying to [comment:5 Carlton Gibson]:


> This looks like a configuration error. As far as I can see everything is
working as expected.
>
> > `You are 7 hours ahead of server time.`
>
> The default `TIME_ZONE` is `'America/Chicago'`, which is GMT-5.
`'Africa/Johannesburg'` is (as you say) GMT+2, so there's your 7. Best
guess is that your settings aren't applied as you think they are.
>
> However, without more detail it's impossible to say if there's a deeper
error.
>
> If you can create a sample project that demonstrates an issue, then we
can have a look, but short of that, there's nothing we can say.

Thank for you that extra insight, I will see if I can isolate it and make
a sample project.
It appears as though the setting is applied to me:

{{{
$ python manage.py shell
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings
>>> settings.TIME_ZONE
'Africa/Johannesburg'
}}}

I will try think of what else I can do.

--
Ticket URL: <https://code.djangoproject.com/ticket/33810#comment:6>

Reply all
Reply to author
Forward
0 new messages