How to get the timezone from client

10 views
Skip to first unread message

Markus Bala

unread,
Sep 27, 2018, 11:51:41 PM9/27/18
to tryton-dev
Hi,

I noticed that setting timezone in user preference is missing.
However, in the documentation still show the setting.

Back to topic,
My situation is to print the printer date/time in the report.
If in the libreoffice, I set the date from the report. It will take the server date but server's date is UTC timezone.

So, I will custom printed_date but how to get the timezone from client show that can show the correct time?

Best regard,
Markus Bala

Cédric Krier

unread,
Sep 28, 2018, 3:27:05 AM9/28/18
to tryton-dev
Hi,

On 2018-09-27 20:51, Markus Bala wrote:
> I noticed that setting timezone in user preference is missing.
> However, in the documentation still show the setting.

It is a mistake, the field has been removed long time ago:
https://bugs.tryton.org/issue7750

> Back to topic,
> My situation is to print the printer date/time in the report.
> If in the libreoffice, I set the date from the report. It will take the server date but server's date is UTC timezone.
>
> So, I will custom printed_date but how to get the timezone from client show that can show the correct time?

You can not know the timezone of the client because it is the OS
timezone on which it runs. The best option is to use a timezone stored
on some record, for example you can use the one on company.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages