# Setting gateway timezone on Linux

**URL:** <https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173>\
**Category:** Ignition\
**Created:** [March 14, 2022, 5:53pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173 "2022-03-14T17:53:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [March 14, 2022, 5:53pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/1 "2022-03-14T17:53:38Z")

</div>

I’m trying to change the timezone on an Ignition 8.1.10 server. It is currently ‘America/Chicago’, but we want to fix it on CST year round. I’ve created a `/etc/localtime` link to `/usr/share/zoneinfo/Etc/GMT+6` and this seems to work fine - MariaDB sees its time correctly.

However, Ignition still reports its timezone in the ‘Gateway/Timezone’ server tag as ‘America/Chicago’. Setting clients to the Gateway timezone results in them showing CDT, not CST. Restarting Ignition and rebooting the server has had no effect. I’m concerned gateway scripts are going to trigger at the wrong time.

Does anyone know where the timezone of the server is set?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 14, 2022, 5:57pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/2 "2022-03-14T17:57:20Z")

</div>

You can force the timezone by setting `-Duser.timezone` in ignition.conf, but it might be best to figure out why the JVM on your system isn’t picking up the change you made…

What distro, what version of Ignition/Java, and do you already have a timezone being set in ignition.conf by chance?

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [March 14, 2022, 6:04pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/3 "2022-03-14T18:04:37Z")

</div>

Distro is Debian 10.11  
Ignition is 8.1.10  
Java is built-in Azul 11.0.11

No timezone is being set in ignition.conf as far as I can see. I can force clients to ‘Etc/GMT+6’ but the server timezone is still reported as ‘America/Chicago’.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 14, 2022, 6:11pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/4 "2022-03-14T18:11:01Z")

</div>

I’m having trouble finding concrete documentation on how the JVM looks up the timezone on Linux, but I did find this somewhere:

1. JVM uses the environment variable TZ if it is set.
2. If TZ is not set, then JVM looks for the file /etc/sysconfig/clock and finds the ZONE entry.
3. If neither TZ nor ZONE is set, JVM compares the contents of /etc/localtime to the files in /usr/share/zoneinfo looking for a match. The matching path and filename under /usr/share/zoneinfo provides the time zone.

and another:

1. Find `TZ` environment.
2. Read `/etc/timezone` .
3. Read `/etc/localtime` . If it is a soft link(ex: `/usr/share/zoneinfo/Asia/Shanghai` ), return timezone by path. Otherwise, compare the content with all files in `/usr/share/zoneinfo` , if found, return timezone.
4. Return `GMT` as timezone.

Seems that `/etc/timezone` may take precedence over `/etc/localtime`, might check that.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [March 14, 2022, 6:20pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/5 "2022-03-14T18:20:01Z")

</div>

Spot on Kevin, it looks like `/etc/timezone` does indeed take precedence over `/etc/localtime` for the JVM. When I changed that to ‘Etc/GMT+6’ and restarted Ignition it all looks to be working fine.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 14, 2022, 6:20pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/6 "2022-03-14T18:20:43Z")

</div>

Verified as much in the source too: [openjdk-jdk11u/TimeZone\_md.c at 4f9c8c4c48683a77655faa63c23da2f77cb208d0 · AdoptOpenJDK/openjdk-jdk11u · GitHub](https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/4f9c8c4c48683a77655faa63c23da2f77cb208d0/src/java.base/unix/native/libjava/TimeZone_md.c#L247-L354)

Seems to be Debian-specific?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 14, 2024, 5:50pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/7 "2024-11-14T17:50:32Z")

</div>

Sorry to necro this, but I do have an extra bit of info for future us, as I just ran into this today.

I had the designer open when I restarted the gateway. When it reconnected, it switched to the correct time zone in the designer, but still had the original offset showing in the clock. Restarting the designer fixed it, but it still stumped me for a bit and had me second guessing myself.

It was rather like being chased by kids with sticks, then realizing I probably shouldn't have worn my piñata costume for Halloween. 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [November 14, 2024, 7:50pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/8 "2024-11-14T19:50:48Z")

</div>

Thank you,

Using Debian 12 the only way to make it work for me was to set system variable TZ on file `/etc/environment` by using command` TZ="Europe/Rome"`

After restarting the machine, ignition gateway was finally using custom timezone.

---

<div class="post-metadata">

**Author:** ![Daniel\_Noriega](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniel_noriega/32/79935_2.png) [@Daniel\_Noriega](https://forum.inductiveautomation.com/u/Daniel_Noriega)\
**Post date:** [September 11, 2025, 9:29pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/9 "2025-09-11T21:29:29Z")

</div>

It seems this issue was recently resolved by the OpenJDK devs. Is ignition shipped with its own Runtime Environment? or does it use the one installed in the machine?

[[JDK-8350686] Release Note: Changes to the Default Time Zone Detection on Debian-based Linux - Java Bug System](https://bugs.openjdk.org/browse/JDK-8350686)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 11, 2025, 9:29pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/10 "2025-09-11T21:29:56Z")

</div>

Ignition has shipped its own runtime since Ignition 8.0.

---

<div class="post-metadata">

**Author:** ![Daniel\_Noriega](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniel_noriega/32/79935_2.png) [@Daniel\_Noriega](https://forum.inductiveautomation.com/u/Daniel_Noriega)\
**Post date:** [September 11, 2025, 9:34pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/11 "2025-09-11T21:34:58Z")

</div>

I see. My gut tells me ignition will not use OpenJDK \>= 25 anytime soon, so I think the best approach then will be to manually update the /etc/timezone file in Debian based distros. That fixes it.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 11, 2025, 9:41pm UTC](https://forum.inductiveautomation.com/t/setting-gateway-timezone-on-linux/57173/12 "2025-09-11T21:41:18Z")

</div>

Yeah, I wouldn't expect JDK 25+ until whatever major version happens after 8.3, likely in 2027.

Ignition 8.3 will almost certainly remain on JDK 17 for its entire lifespan.
