# Update the perspective date component as per system date

**URL:** <https://forum.inductiveautomation.com/t/update-the-perspective-date-component-as-per-system-date/56360>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting, ignition80\
**Created:** [February 21, 2022, 11:51am UTC](https://forum.inductiveautomation.com/t/update-the-perspective-date-component-as-per-system-date/56360 "2022-02-21T11:51:32Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [February 22, 2022, 1:05pm UTC](https://forum.inductiveautomation.com/t/update-the-perspective-date-component-as-per-system-date/56360/6 "2022-02-22T13:05:52Z")

</div>

Yes, your scripts can take the UTC milliseconds from the `java.util.Date` Ignition uses and make a `java.time.Instant` with its static method [.ofEpochMilli()](https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#ofEpochMilli-long-). Then, obtain a `java.time.ZoneId`, usuallly by lookup with [.of()](https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#of-java.lang.String-). With those two, you can obtain a `java.time.ZonedDateTime` with its [.ofInstant()](https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html#ofInstant-java.time.Instant-java.time.ZoneId-) method.

That can then be formatted numerous ways, all respecting the given `ZoneId`.

---

_[View the full topic](https://forum.inductiveautomation.com/t/update-the-perspective-date-component-as-per-system-date/56360)._
