Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#2625 closed defect (worksforme)

TIME_ZONE setting inadequate behaviour

Reported by: bakaras@… Owned by: adrian
Component: Database layer (models, ORM) Version: 0.95
Severity: normal Keywords: time_zone, datetime
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I have a model with a 'datetime' field and its auto_now_add argument set on. In settings.py of my project I have TIME_ZONE = 'Europe/Moscow'. So, when I create a new object of that model the value of that datetime field is 3 ours decreased.

For example, if now is '30 aug 2006 14:00:00' and I executed test1=My_Model(), then after executing test1.save() result of query:

    set time zone 'Europe/Moscow';
    select my_datetime_field from my_project_my_model;

will return '30 aug 2006 11:00:00'

P.S. I use Postgres 8.1 as DBMS.
P.P.S. Sorry for my English.

Change History (2)

comment:1 Changed 8 years ago by mir@…

  • Resolution set to worksforme
  • Status changed from new to closed

Your database time is probably wrong. Please ask in the django-users mailinglist for support if required. If discussion finds that this is really a bug, please reopen the ticket.

comment:2 Changed 8 years ago by mir@…

wait a bit ... if you use Microsoft Windows, then this is a duplicate of #2315. Please take a look there, you can even find a patch.

Note: See TracTickets for help on using tickets.
Back to Top