I found a workaround but I'm not sure what the ramifications are. I
commented out this line in django.conf.__init__.py:

    os.environ['TZ'] = self.TIME_ZONE

On Mar 12, 10:19 am, "DavidA" <[EMAIL PROTECTED]> wrote:
> I have some scripts that run tasks and use Django DB models. They have
> been running an hour late today after all the DST changes (here in the
> US). I've traced it down to any call to Django is shifting my time
> back an hour (like it was before this weekend's shift).
>
> So the time as reported by time.time() and datetime.datetime.now() are
> both correct _before_ this call:
>
>   task = Task.objects.get(pk=opts['--taskid'])
>
> where Task is a Django DB model. But immediately after this call both
> time.time() and datetime.datetime.now() return a time an hour earlier
> (after formatting using strftime).
>
> I'm running under Windows 2003 Server (patched for DST and verfied
> that the OS is patched). And I have TIME_ZONE set to 'EST5DT' in my
> Django settings file.
>
> I've tried manually setting the TIME_ZONE variable using
> django.conf.settings.configure so it wouldn't effect the
> os.environ['TZ'] setting, but then all python time seems to be based
> as UTC, not New York time.
>
> Has anyone seen anything similar? Can someone suggest a fix or at
> least a quick workaround?
>
> Thanks,
> -Dave


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

Reply via email to