Usage of timezones stored in user setting ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Usage of timezones stored in user setting ?

Valentin LAB
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 ?

Did I miss a special trick ?

Thanks for your enlightenments,

--
Valentin LAB

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage of timezones stored in user setting ?

Stefan Rijnhart
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: [hidden email]
tel: +31 (0) 614478606
http://therp.nl
https://twitter.com/therp_stefan


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Loading...