On Feb 21, 2:33 am, Danny Adair <danny.ad...@unfold.co.nz> wrote:
> On Tue, Feb 21, 2012 at 13:17, Yo-Yo Ma <baxterstock...@gmail.com> wrote:
> > I haven't quite read up on all the UTC-related stuff in Django as of
> > yet (couldn't find much info about it), but I found some of the posts
> > above concerning. It would seem that if a DateTimeField should be
> > updated with ``timezone.now()``, then a DateField should be updated
> > with ``timezone.now().today()``, and TimeField should be updated with
> > ``timezone.now().time()``, no? If I'm in EST time, and the server is
> > in MST, and it's 11:00PM on the server, my records should be updated
> > as the following day, since it's 1:00AM EST. Is this naive to assume
> > (if not, apologies for my lack of know-how regarding TZ issues)?
>
> There's a logic to either way, but I agree that auto_now for a date
> should use the user's timezone to determine "today", not the server's.
> It would be very weird for me to add a model instance and be told that
> I did that "tomorrow".

The real problem is, as said before, that whatever you do, last edited
date doesn't work in multi-timezone setting. Somebody is going to see
last edited "tomorrow" or seeing his last edit as "yesterday".

I really, really think the date should be UTC date. That is what you
are going to do comparisons against in the DB. In other words, once
you put the date value into the DB, it will be in time zone UTC in
there when you compare it against any datetime value!

In addition, I will once more say that if settings.USE_TZ = True, then
the Python process default time zone should be UTC. When using time
zone aware datetimes, they are handled as UTC datetimes in the Python
process. I can't see any point why the time zone for the process
should be something else? What is gained by that? Isn't using Europe/
Helsinki for the process timezone downright dangerous due to daylight
saving times? Am I missing something obvious here?

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to