I have a Django application running with mod_python on Apache. In settings.py I have set TIME_ZONE="America/New_York". Within my application I verify that os.environ['TZ'] is indeed set to this value. Within my view.py I use datetime.datetime.now() to create a time stamp that is stored in a model as a DateTimeField and viewed on a rendered html page.
However, the times that I generate in my view are all off from what they should be by five hours. I've changed the time zone around "America/Chicago", "America/Anchorage" etc. no matter what I set TIME_ZONE to, I get the same wrong time (5 hours off). If I go to the admin page and use the change entry page to modify the values stored in the database, the Time now link gives the correct time? Any idea on what is going on here? I'm particularly perplexed as to why the admin page and my view are giving different times. Brian --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---