Recommended way of displaying timestamps in another locale's timezone in Workshop

184 Views Asked by At

I understand that most Foundry frontend applications expect timestamps to be formatted in UTC and conveniently display these in the user's timezone.

In some cases however, time stamps should, for all users regardless of their locales, be consistently displayed in a specific time zone.

For example a flight's departure and arrival time are expected to be in the time zone of the departure and arrival locations, a factory's production event in the time zone of the factory, ...

What's the recommended way of implementing this behaviour in Workshop?

1

There are 1 best solutions below

1
On

This configuration is controlled in the property formatting at the Ontology configuration level, rather than in a particular application like Workshop.

Turn on the Date and Time Formatting option in the property configuration and then choose a display format. Click the dropdown that defaults to The user's timezone to change to A static timezone.

You can choose a single static timezone or choose a Reference to another property that has the timezone string to use. This allows, for instance, a configuration where the displayed date/time is always shown using the timezone associated with the individual object. If you are using a Reference the property representing the timezone values should be a STRING with values like America/New_York that match the TZ database name.

This formatting will then be used across all representations of this property in Workshop, Quiver, or Object Explorer ensuring consistency. If you would like to have both representations, create a duplicate of the column in the input dataset and then have two properties on the object, identical except for the specified formatting.

enter image description here