Community: Framework mailing list archives

TZ in Odoo

- 07/13/2015 09:15:02
Hi Levent,

I kept experimenting a bit longer... It seems Odoo does not take the
user's configured TZ into account when showing datetimes.

- AJAX calls return datetime values as they are in the DB.
- The UI is the one chosing to represent those values in the TZ of the

This makes sense for many use cases.  However it poses a challenge when
your use case conveys explicit timezone information:  Two people in
different timezones coordinating a future event that will occur in a
third TZ may require both see the same datetime in the TZ where the
event will occur. 

For instance, my family and I live 3 timezone hours apart, we're
planning to make a trip together to Fiji, when we're there we'll share
the same TZ; so when I say let's dinner at 7PM this time is naturally
Fiji time and not whatever time will be in Fiji when is 7PM at my place.

This is tricky, though.  If two people are coordinating an event, but
they will be attending it from its current TZ (ie. a phone call) they
surely need to see the event in their TZ. 

Grepping the sources I've found a lot places where there are tz
calculations. Some of those are at the DB level, but I still don't know
when they are called.

Best regards,

Le 11/07/2015 05:21, Levent Karakas a écrit :
> Since you don't have user context in workflows, you don't have
> timezone and language setting. Not only tz but also translation is not
> possible as well.