The conversion of time from one time zone to another occurs when sending control commands (with a timestamp), synchronizing time, and receiving information objects with the timestamp CP56Time2a.
The time formation process for control and time synchronization commands is as follows: the current local time is converted to UTC (based on the operating system’s time zone settings), then the UTC time is converted to the time in the time zone specified in the Device Time Zone parameter. For example, the operating system’s time zone is Europe / Moscow (UTC +03: 00), the client’s current time is 2019-12-15 19:31:00, and the time zone specified for the device is America / Costa_Rica (UTC -06: 00). The total time that the command will contain will be generated as follows: 2019-12-15 19:31:00 (Local) → 2019-12-15 16:31:00 (UTC) → 2019-12-15 10:31:00 (Device Time Zone).
The conversion process of the timestamp CP56Time2a of the information object to the timestamp of the tag is as follows: the time of the information object is converted to UTC (based on the device’s time zone settings), then the received UTC time is converted to the time in the time zone of the operating system. For example, the device’s time zone is America / Costa_Rica (UTC -06: 00), the device’s current time is 2019-12-14 19:15:00, and the time zone of the server is Europe / Moscow (UTC +03: 00). The total time of the tag will be formed as follows: 2019-12-14 19:15:00 (Device Time Zone) → 2019-12-15 01:15:00 (UTC) → 2019-12-15 04:15:00 (Local). If an invalid or ambiguous time occurs during the conversion of CP56Time2a time from one time zone to another, the ASDU will be assigned the timestamp of the tag. You can read more about invalid and ambiguous times here.
To ensure cross-platform compatibility, time zone identifiers from the IANA database are used. Therefore, if time zone identifier is not found when uploading the configuration, for example, from the test server to the production server, then the local time zone will be used to convert the time, and an error message will appear in the server’s event log. In order to avoid problems associated with the time conversion from one time zone to another, it is recommended to generate timestamps in the UTC time zone at the controlled station.