Issue with timezone & gateway datetime

I'm in trouble with gateway datetime after a change of timezone at OS level (Windows 10).

  1. The gateway (8.1.44) is running with timezone = CET (+1h GMT, e.g. 9pm)
  2. I stopped Ignition service, changed the timezone to Europe/Moscow (+2h GMT, e.g. 11pm)
  3. The OS time changed, as here:
  4. I started up Ignition and at Gateway level is working properly, as in the following (also timezone, when showed):
  5. Indeed at runtime (luncher) and in the designer the [System]Gateway/CurrentDatetime is still at +1h GMT, despite showing Timezone = Europe/Moscow:

Really in trouble and difficult to understand. The client is setting up machines for different countries/continents and it is a severe issue at my end. Can anyone help?

Thanks.

The string presentation of the CurrentDateTime tag is localized to the local environment (e.g. whatever computer launched the designer/client), so when you are displaying as a string, such as when looking at the tag in the tag browser, you're getting what appears to be the wrong time. But the actual underlying Java Date object represents an instant-in-time, in epoch milliseconds, and is accurately reflecting the system time of the gateway (based on your other screenshots).

Besides the cosmetic appearance of this tag in the tag browser, what actual problem(s) are you noticing?

1 Like

I need to use/show the gateway datetime as a formatted string from the datetime, independently from client locale.

I could substitute with a derived/expression tag, but I need a datetime datatype tag. It is used extracting hrs/min in several part as “gateway datetime” using datetime to string (both on scripts and expressions)

Is this throughout the project? Can you not set the project to use gateway timezone everywhere? (Look in project settings.)

Thx all for the hits.

The problem is sorted out as per @pturmel hit, indeed there is not the problem!

In the whole project (not mine...) was forced always "Europe" as Timezone Behaviour.
That was "moving" the time in respect of Gateway timezone, if changed.

In such a way, properly in respect of settings, neither the client-side now() function nor the CurrentDateTime (gateway) were consistent with expected results (client and/or gateway timezone).

All clear, all good. Thx again