Time zone

Introduction

In UNIQO, it is possible to choose the time zone in which dates and times at runtime are displayed in the interface and recorded by the loggers. The possible time zones are the following:

  • UTC time zone standard

  • local time zone, i.e. of the machine on which the Q Application runs (e.g. UTC+2)

  • session time zone, which may be different from the local time zone of the place where the data are generated (for example in applications that support remote web sessions).

Date and time properties

In UNIQO, date and time are expressed by OPC UA DateTime data types.

Date and time of the events (BaseEventType) are managed through the following properties:

Properties

Data type

Description

Time

UtcTime

Date and time of the UTC+0 time zone standard

LocalTime

TimeZoneDataType

Offset in minutes between UTC date/time and local date/time of the device on which the application is used. For example, on a device set to UTC+2, the offset corresponds to 120 minutes. If applicable, include the DaylightSavingInOffset data, i.e. the offset of daylight saving time.

Note

the Local time property of the events indicates the offset with respect to the UTC time zone. The Event logger widget Local time column instead contains information on the local date and time of Date time type, obtained from the sum of the Time property and the Local time property of the events.

Date and time of the session (SessionType) are managed through the following property:

Properties

Data type

Description

TimeZoneOffset

TimeZoneDataType

Offset of the session date and time with respect to UTC+0

Default time zone in the UNIQO objects

Date and time of the events generated by UNIQO objects are always in the standard time zone, and are stored in the databases in the same way.

By default, the graphical objects (e.g. Trend Graph, Date and Time) display the date and time in the standard time zone. On the contrary, the Alarm Grid and ** Alarm History Grid** widgets display date and time in the local time zone.

Display the alarm events in the UTC time zone standard

At runtime, the Data Grid object of the Alarm Grid and Alarm History Grid widgets displays the Local time property of the events in the Timestamp column.

If you want to display the UTC time zone standard in the widget…

Then, in the Timestamp column of the widget Data Grid object…

Alarm Grid

set a dynamic link with the Time property of the alarms (see Display the events in Alarm History Grid in the UTC time zone standard)

Alarm History Grid

set a dynamic link with the Time property of the alarms through a node pointer (see Remotely display the alarm events in the local time zone)

Remotely display the alarm events in the local time zone

At runtime, the Data Grid object of the Alarm Grid and Alarm History Grid widgets displays the Local time property of the events in the Timestamp column.

In projects that support remote sessions, widgets can be displayed on devices with different local time settings. In this case, the date and time of the widget can be displayed in the device local time zone, regardless of the time zone in which the events were generated.

If you want to display the session time zone in the widget…

Then, in the Timestamp column of the widget Data Grid object…

Alarm Grid

set a convertor of the Expression evaluator type with the sum of the {Item}/Time and {Session}/TimeZoneOffset properties (see Remotely display the alarm events in the local time zone)

Alarm History Grid

Reference time zone in Trend Graph objects

At runtime, the Trend graph object displays the X time axis data in UTC time zone standard. Through the Reference time zone property, it is possible to choose whether to display the data in the local time zone or in the session time zone (see Trend).

When the object is linked to a Data logger, to store the data in local time zone, the Log local time property of the Data logger must be enabled.

See also

Related procedures

Manage the time zone