# How to setting up timezone

**URL:** <https://discuss.tryton.org/t/how-to-setting-up-timezone/3728>\
**Category:** Developer\
**Created:** [January 26, 2021, 10:29am UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728 "2021-01-26T10:29:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yensei](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/yensei/32/1327_2.png) [@yensei](https://discuss.tryton.org/u/yensei)\
**Post date:** [January 26, 2021, 10:29am UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/1 "2021-01-26T10:29:50Z")

</div>

Hi,

I’ve trying to change the timezone used by tryton server, but until now I don’t know how to config.

The linux server and postgres database shows a correct time but trytond still logging as UTC timezone and all the new data in the DB’s tables, we need setup it to UTC-3.

How can I do it?

thanks in advance.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [January 26, 2021, 11:26am UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/2 "2021-01-26T11:26:45Z")

</div>

You can not change that. trytond must always run in UTC. It is the client that is responsible to display date/time in the user timezone.

---

<div class="post-metadata">

**Author:** ![Niddorcahm](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/niddorcahm/32/1376_2.png) [@Niddorcahm](https://discuss.tryton.org/u/Niddorcahm)\
**Post date:** [March 26, 2021, 4:07am UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/3 "2021-03-26T04:07:42Z")

</div>

Hello, I am new to the post. 2 years ago I use tryton for my little lab with the gnuhealth module. It really is wonderful and very functional.  
I have the same problem for a long time without solving.  
The company is configured in the correct time zone (america / santiago) which is UTC -3. However, all reports appear with UTC 0.  
I have also checked that the data is saved to the postgres database at UTC 0.  
I run tryton 5.0 on opensuse leap 15.2.  
Thank you very much

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [March 26, 2021, 8:48am UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/4 "2021-03-26T08:48:07Z")

</div>

> [@Niddorcahm](#):
>
> However, all reports appear with UTC 0.

No standard Tryton report display any datetime so it must be custom reports.  
As they are executed on server-side they must take care of formatting the datetime with the proper timezone (see `Report.format_datetime`).

---

<div class="post-metadata">

**Author:** ![Niddorcahm](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/niddorcahm/32/1376_2.png) [@Niddorcahm](https://discuss.tryton.org/u/Niddorcahm)\
**Post date:** [March 26, 2021, 7:57pm UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/5 "2021-03-26T19:57:37Z")

</div>

They are not the standard tryton reports. Reports are the gnuhealth defaults. But, we have already tried many ways with no success, finally we solve it in an unsuitable way by adding “datetime.timedelta (hours = 3)” in the report.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [March 26, 2021, 8:02pm UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/6 "2021-03-26T20:02:17Z")

</div>

The method [`Report.format_datetime`](https://hg.tryton.org/trytond/file/ccaa706ed324/trytond/report/report.py#l362) take a timezone as parameter. So usually you pass the company timezone to.

---

<div class="post-metadata">

**Author:** ![bala4901](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/fbc32d/32.png) [@bala4901](https://discuss.tryton.org/u/bala4901)\
**Post date:** [March 27, 2021, 1:18pm UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/7 "2021-03-27T13:18:20Z")

</div>

You may open the sales, invoice, purchase module.. looking for the report. There are date , you may have a look

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [March 27, 2021, 2:00pm UTC](https://discuss.tryton.org/t/how-to-setting-up-timezone/3728/8 "2021-03-27T14:00:03Z")

</div>

There is no timezone on date only datetime can have a timezone. So as I said we no report in standard which display datetime.
