Unclear release date for OpenERP

I am using OpenERP version 6.1 and OpenERP web client . The OpenERP server is installed on my laptop, so the server and client are on the same computer.

The problem I am facing is that it looks like this: OpenERP treats my local time as the current UTC time. My time zone on Windows is set to UTC+5:30 hours (Asia/Colombo) , and the current time is 11:00 AM . When I see the current time using OpenERP,

  'date_created': lambda *a: datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 

This shows me 03/29/2012 16:30:24 instead of the correct time 11:00. My point is that OpenERP gets the current time and adds 5 hours 30 minutes to the current time and shows me. So OpenERP assumes my current local time as the current UTC time.

I have to install the software on the client’s site, but without it fixed, I can’t install.

+5
source share
2 answers

The release notes for OpenERP v6.1 indicate that the server and database now work exclusively with UTC dates, ignoring the OS’s time zone settings.

The time zone conversion is performed dynamically by the client:

  • the web client uses the browser settings (usually this matches the settings on the client computer)
  • The GTK client uses the setting in the user settings.
+5
source

There is one golden rule for datetime fields in 6.1 additional codes: " ALWAYS work in UTC - compute in UTC - save in UTC " UTC values ​​will be correctly converted to local time when the result is diplayed in client form.

+3
source

All Articles