Perspective powerchart timezone with tag history

Hi All

I have read many forum posts on this topic but I am still struggling.

I have an AWS ignition server running Perspective. Historical data is being sent to a separate mySQL server. I would like all client sessions to use the same time zone as the ignition server (UTC). Currently, powercharts showing historical data have the time axis corrected for my geographical location. Since I am developing the system in New Zealand, this results a large time difference.

Designer time zone

Perspective time zone

The SQL timestamps are in UTC. I have checked this by reading the data directly (not with ignition). Please can someone explain how I can force the time zone in the browser sessions so that the data is not corrected?

Thanks.

I've added a readout of the locale and time zone to my dashboard. Both are displaying as expected based on the project properties. However, the historical data appears to be returned with the timestamp corrected to my local time. How do I stop this from being converted?

The issue is also displayed when using the reporting module since this also contains an SQL query.

I believe most of the Perspective Components use the session.props.timeZoneId & session.props.locale property for converting time to client locale. Can we assume those are the properties you are displaying in your screenshot?

The below doc has some good insight as to the nuisances nuances of timestamps in Perspective:

For additional testing:

The current time zone can be added to the display by adjusting the timeAxis > tick > label > format property

and, perhaps related:

The Date Time Input will use the browser’s time zone as the offset for the actual date and time value selected. If a different time zone is needed, then a script similar to the Time Zone Script Transform Example can be used to create an adjusted value property.

Are you positive that the gateway is actually set to UTC?

What happens if you change the Project Timezone to UTC instead of Gateway Timezone?

Hi and thanks for the reply.

Yes, I am displaying the session properties. The "nuisance" of handling time zones. I agree!

I will have another read of that page and add your suggestions.

Thanks again and happy holidays.

1 Like

John, please edit your post to not include your contact information. (Probably not good to display like that, but also against this forum's rules.)

If you cannot get your mail system to omit such fragments, don't use email replies to post here at all.

Apologies - I replied via email and my signature was added. Now deleted.

From the gateway. Hovering over this shows "Etc/UTC"
image

From google

No change when modifying to use UTC instead of gateway timezone.

Update: The historian seems to be now working as expected. I'm not clear on what fixed the issue. See the 12 hour "gap" in the data below.

I did change the project time zone from "gateway" to "UTC" and then back again.

Was there a gateway restart mixed in there? (Ignition doesn't notice changes to the gateway OS's timezone until restart.)

1 Like

A session restart might also be required between updates for many of these settings.