← Back to team overview

openerp-expert-framework team mailing list archive

Re: Usage of timezones stored in user setting ?

 

On 06/26/2013 09:29 AM, Valentin LAB wrote:
Hi,

I'm currently working with some event code and I was wondering how Timezone support is supposed to be handled ?

Especially, there's a user setting labelled "Timezone" that you can change, but I'm not sure what it is supposed to do.

For example, if I go to Messaging / Calendar (with base_calendar module installed), and I create a new event, it doesn't seem to take my user setting into account, and seems to use my system setting.

To be more precise: the web client sends json containing the UTC date to the ``create`` action. And this UTC date seems to come from my system preferences and not openerp preferences. Tests are quite easy to make on runbot for instance.

Is this a bug or is their some special meaning to the timezone stored in the user settings that I wouldn't be aware of ?


Hi Valentin,

dates are indeed transmitted and stored in the database in UTC. The web client renders the dates and times in your local timezone which your browser picks up from your system settings. The user preference is only used when dates and times are rendered on the server side, for instance when a report is created.

More details here: https://bugs.launchpad.net/openerp-web/+bug/918257/comments/4

Cheers,
Stefan.


--
Therp - Maatwerk in open ontwikkeling

Stefan Rijnhart - Ontwerp en implementatie

mail: stefan@xxxxxxxx
tel: +31 (0) 614478606
http://therp.nl
https://twitter.com/therp_stefan



References