It is definitely invalid:

Times *must* be represented at local (server's) timezone, if none specified.
http://www.postgresql.org/docs/9.0/static/datatype-datetime.html

Using UTC would contradict the documented behavior.

-- 
Server use local time instead of UTC/GMT for ORM records.
https://bugs.launchpad.net/bugs/461909
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: Won't Fix

Bug description:
I think this is a big issue, that prevent Open ERP to become big.

When a record is created, or updated in the database, the ORM set 'create time' 
or 'update time' to the local current time.

UTC/GMT should be used instead for two reasons:
- When your time change for daylight saving time, you are going to have record 
with a time prior to another that was created before.
- When you try to sync your database with another one that isn't in the same 
country (or planet.. have a look in the future), you are going to have a 
problem too.

One quick solution is to use:
'timestamp with time zone' instead of 'timestamp without time zone'

The PostgreSQL NOW() function already support that.
Prior to PostgreSQL 7.3, writing just timestamp was equivalent to timestamp 
with time zone. This was changed for SQL compliance. Source: 
http://www.postgresql.org/docs/8.4/interactive/datatype-datetime.html





_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to