Re: datetime problems with Django application

2009-11-11 Thread Brian Neal
On Nov 10, 5:41 pm, BEC wrote: > 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

Re: datetime problems with Django application

2009-11-11 Thread Brian Chapman
At this stage, we just have some small applications using SQLite. I've noticed that I am always getting UTC despie what I set with time_zone. By last night I'd accepted the idea of using UTC internally and started looking into pytz to faciliate interface conversion, so I think I'm on the same

Re: datetime problems with Django application

2009-11-11 Thread David De La Harpe Golden
BEC wrote: > 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. > That does sound weird. What database are you using? Not an immediate help, but the sane way to handle timezones in django in my experience: (0)

Re: datetime problems with Django application

2009-11-10 Thread Brian Chapman
There may be another application setting the time zone, but my question still remains as to why the admin page is getting the correct time but the view is not. Brian On Tue, Nov 10, 2009 at 7:45 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > > On Nov 11, 10:41 am, BEC

Re: datetime problems with Django application

2009-11-10 Thread Graham Dumpleton
On Nov 11, 10:41 am, BEC wrote: > 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 problems with Django application

2009-11-10 Thread BEC
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