[SOLVED] Timezones in Ignition Component Scripting

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?

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.

1 Like

gateway

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

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

1 Like

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.

How would i rectify this?

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.

2 Likes

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

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