Thursday, August 21, 2014

Re: Feeling some serious timezone pain

Could there be something in or running the template that has a DST
(daylight savings time) value turned off?
--
Geoffrey S. Knauth | http://knauth.org/gsk

On Thu, Aug 21, 2014, at 07:46, Erik Cederstrand wrote:
> Den 21/08/2014 kl. 00.09 skrev Chris Whiten <chris.whiten@gmail.com>:
>
> > I can understand that sentiment... But that doesn't change the fact that 12:00 PM on the Python side renders as 11 AM in the template, right?
>
> Your database stores the datetime as (the equivalent of) 16:00 UTC,
> right? Which is expected, because you POST'ed 12:00 Toronto time, and the
> date was in August, and Toronto is presumably 4 hours behind of UTC in
> August (haven't checked). But your tamplate renders the correct datetime
> wrong?So the template must be doing the wrong thing.
>
> Can you show your settings.py timezone values? And the template code
> which renders the localized datetime? (see
> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/#time-zone-aware-output-in-templates)
>
> Erik

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1408626195.4008566.155204557.328E2832%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment