# \[SOLVED\] Timezones in Ignition Component Scripting

**URL:** <https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603>\
**Category:** Ignition\
**Tags:** vision, ignition80\
**Created:** [October 12, 2020, 7:24pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603 "2020-10-12T19:24:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 12, 2020, 7:24pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/1 "2020-10-12T19:24:27Z")

</div>

Good afternoon,

I have the following code in 2 places:

```
dateAdded = system.date.format(system.date.now(), "yyyy-MM-dd HH:mm:ss")

```

The first place is a powertable on the ‘onCellEdited’ function. This returns a date 2 hours from now. I also have the code in the project library running under a custom definition. This returns the proper time identical to the client computer.

(I also see in the Ignition Gateway (running in timezone C) that the gateway thinks it’s in a timezone 2 hours behind current local time.)

What gives? How do I sync all my timers?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 12, 2020, 7:28pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/2 "2020-10-12T19:28:35Z")

</div>

What is the project setting for client timezone? One of the options is to use the gateway timezone, and I suspect that is what you are set to.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 12, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/3 "2020-10-12T19:32:08Z")

</div>

![projectSettings](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8c824f0cda50441cc5433aa8f12ae50f985c775e.jpeg)

![gateway](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a7e3f740b5b00414e643e3715fdc9314b621a032.jpeg)

Client PC and Gateway Server say they are both running in Central Time (UTC -06:00). They are showing 2:32 PM currently.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 12, 2020, 7:53pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/4 "2020-10-12T19:53:37Z")

</div>

Do you have a timezone override in the gateway ignition.conf file?

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 12, 2020, 8:13pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/5 "2020-10-12T20:13:11Z")

</div>

I was able to find this in the conf file… but I don’t know how it got there. I can most definitely say it wasn’t put here manually by anyone.

 ![conf](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/2/82177d2d73546c73dbe2a3fa74514cd2df05ab6b.jpeg)

How would i rectify this?

---

<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:** [October 12, 2020, 8:17pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/6 "2020-10-12T20:17:29Z")

</div>

You can probably delete parameters 4 though 8, especially if you aren’t aware of any reason you added them. You’ll have to restart the gateway after that.

If nobody explicitly added these I would guess they came from a backup you restored at some point, maybe even as the basis you built your entire system on.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 12, 2020, 8:31pm UTC](https://forum.inductiveautomation.com/t/solved-timezones-in-ignition-component-scripting/39603/7 "2020-10-12T20:31:32Z")

</div>

Thank you both. Deleting those parameters fixed all my time problems.

You are correct; I was working from a backup I restored.
