Ignition Perspective Page to show the client System date and time

In the transform, I recommend converting the Date to an Instant, then to a ZonedDateTime object with the ZoneId selected by self.session.props.timeZoneId.

String conversion of the ZonedDateTime will use the client's timezone.

The transform would look like this:

from java.time import ZoneId
return value.toInstant().atZone(ZoneId.of(self.session.props.timeZoneId))
1 Like