Thursday, July 29, 2010

Re: Django has incorrect time

Try changing time zones in your

For example:

TIME_ZONE = 'America/Los_Angeles'

And make sure if you're running on Windows it matches your system's
time zone. Regardless, you should see some kind of change when you do
this. If you don't perhaps the isn't loading properly.

On Jul 29, 7:33 am, Alex <> wrote:
> I'm having some strange behavior when using Django and Postgres.  My
> system time zone is EDT and when running ) from a
> *Python* shell I get the correct time.  If I run a Django shell
> through it is an hour behind.  I similarly have set up a
> view on a web page to display the time and it is also an hour behind.
> Now this is where things get tricky.  I have some database fields that
> default to ) and get updated to the same when changes
> occur to the objects the fields are contained in.  The database gets
> the correct local time (say 10:30) but when these values are displayed
> by Django on a page they are again an hour behind.
> So, Django cannot present the correct value (one hour behind) to me,
> but somehow the correct time gets inserted in the database, and when
> directly displaying this value from the database in Django it is again
> one hour behind.
> It sounds like a time zone thing but I've tried setting Django to an
> eastern zone and also None (to use the system TZ) but neither seemed
> to make a difference.  Any help here?

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment