# PostgreSQL and timezones

**URL:** <https://forum.inductiveautomation.com/t/postgresql-and-timezones/1923>\
**Category:** Archived Topics\
**Created:** [June 10, 2010, 6:00pm UTC](https://forum.inductiveautomation.com/t/postgresql-and-timezones/1923 "2010-06-10T18:00:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 10, 2010, 6:00pm UTC](https://forum.inductiveautomation.com/t/postgresql-and-timezones/1923/1 "2010-06-10T18:00:45Z")

</div>

This was mentioned in a different thread, but I thought it would find more viewers here.

Postgres has it’s own concept of which timezone it’s in. In the postgresql.cong file there is a line`timezone = `If this is set, it will overide the computers timezone setting. The now() function (or localtime() ) will return the time in the zone set in the conf file. _Not_ the computers time.

If this line is commented out, postgres will use the computers timezone.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [June 14, 2010, 9:34pm UTC](https://forum.inductiveautomation.com/t/postgresql-and-timezones/1923/2 "2010-06-14T21:34:53Z")

</div>

Thanks for posting this here, it is a good tip. Timezone issues can sometimes be very confusing to troubleshoot.
