SQL-functions clock_offset_avg and clock_offset_last

Clock-offset

Two new SQL-functions have been added to Invantive’s UniversalSQL:

  • clock_offset_avg: gets the average determined offset in milliseconds from the Invantive reference time server, as calculated from one or multiple measurements over time.
  • clock_offset_last: gets the last determined offset in milliseconds from the Invantive reference time server.

Not all servers and devices have NTP or the time protocol correctly configured, which may lead to a significant deviation between Internet-time and the device.

The Invantive UniversalSQL functions such as sysdateutc for time always return the time according to the system clock. This can include a deviation from Internet-time.

Invantive UniversalSQL measures time difference on start up of the engine and on other occassions by polling an Invantive time server using a custom protocol.

These SQL-functions can be used in case a program needs to assess the time offset from Internet time or adjust the local time accordingly.

Recommended Use

It is recommended to always correct the local time first in compliance with ISO 27001. However, as a safety guard the functions can also be used to assess the deviation and reaise an error when the difference is deemed unacceptable.

Typical time deviation should not exceed 15 seconds. A deviation of smaller than 100 ms is deemed accurate.

Availability

The new SQL-functions are available starting at release 24.0.60.