# Local Time to UTC Shift Start Times across timezones

**URL:** <https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771>\
**Category:** Ignition\
**Tags:** ignition83, perspective\
**Created:** [May 29, 2026, 12:51pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771 "2026-05-29T12:51:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [May 29, 2026, 12:51pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/1 "2026-05-29T12:51:37Z")

</div>

I’m working on a system in Ignition that pulls order confirmations from an API. The API stores all confirmations in UTC, which is ideal.

The challenge I’m facing is that these confirmations originate from multiple plants, each in different time zones and operating on different shifts. The shift start and end times are defined in each plant’s local time. Because of this, when daylight saving time occurs, the corresponding UTC start and end times shift as well.

My goal is to create a UDT for each plant that can handle these time zone and daylight saving adjustments. While I know I can manage time zone conversions within each Perspective client, I would prefer to handle shift time logic at the tag level. This would allow me to automatically calculate and maintain accurate UTC start and end times while keeping each plant’s configuration aligned with its local time zone.

If I rely solely on client-side logic, there’s a risk that a user opening a session from a different time zone could retrieve data that is offset (for example, by an hour), leading to inconsistencies. By centralizing this logic in tags, I can ensure consistency regardless of where the client session is launched.

Looking for any thoughts on handling this?

---

<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:** [May 29, 2026, 1:26pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/2 "2026-05-29T13:26:48Z")

</div>

I would store just the relevant ZoneId in the tag, and do everything else in the UI. See these topics for references to using java's more capable date/time classes:

> [@Gateway Timezones and Script function behavior](https://forum.inductiveautomation.com/t/gateway-timezones-and-script-function-behavior/107050/4):
>
> NO Don't do arithmetic with dates to correct for time zones. java.util.Date objects are fundamentally UTC under the hood, representing a worldwide point in time, and trying to "adjust" them to correct for timezones simply makes them incorrect. If you pass incorrect timestamps to historian calls or other system functions, you will get wrong answers. These objects are stringified in the timezone of the JVM that does the string conversion, and are created by string parsing in the timezone of t…

> [@Ignition Perspective Page to show the client System date and time](https://forum.inductiveautomation.com/t/ignition-perspective-page-to-show-the-client-system-date-and-time/73265):
>
> Is it possible to display the client computer/system date and time on perspective web page? dateFormat(now(60000), "yyyy-MMM-dd HH:mm:ss a") showing the Gateway Server system date and time. Under Browse Tags-\> System -\> Client Tags are not available for Perspective sessions.

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [May 29, 2026, 1:42pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/3 "2026-05-29T13:42:21Z")

</div>

So for the shift start and end time if I store that data in a tag as a string the client can make it's own determination on what the UTC value of that is when it evaluates that?

So for example i have 2 tags  
StartTime 8:00am  
EndTime 4:30pm

Because my client is timezone aware and my start and end time are strings the client should resolve those to the correct time in UTC as long as I am doing the scripting on the UI NOT in the tags? I can do something like a` system.date.setTime`. It gets more complex passing midnight, but I can handle that in a script as well.

---

<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:** [May 29, 2026, 2:02pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/4 "2026-05-29T14:02:49Z")

</div>

Under no circumstances are you to use the built-in date/time functions to manipulate dates and times in different time zones. Use the `ZoneId`, `LocalDateTime`, `ZonedDateTime`, and `DateTimeFormatter` for all manipulation, parsing, and stringification.

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [May 29, 2026, 2:11pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/5 "2026-05-29T14:11:05Z")

</div>

So how should I best store and retrieve shift data like ShiftStart and ShiftEnd?

If my ShiftStart is 8:00am in Daylights Saving, I need it to still be 8:00am outside of Daylights Savings. My UTC time range I pull would change by an hour.

My shift times are the constant in the local times. Some how I need to marry up the shift times with a date to get my full date object.

---

<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:** [May 29, 2026, 2:36pm UTC](https://forum.inductiveautomation.com/t/local-time-to-utc-shift-start-times-across-timezones/115771/6 "2026-05-29T14:36:22Z")

</div>

Parse to a LocalDateTime, actual date + shift start/end time. Convert to a ZonedDateTime by applying the ZoneId. That can be converted to the UTC-under-the-hood `java.util.Date` that Ignition uses everywhere when sending timestamps to tag history or other Ignition APIs. Just don't **print** those anywhere. Only use the DateTimeFormatter to print in specific time zones.
