Go to content
Analog clock with date display

Date/Time synchronization between different systems is a key operation; the goal is to ensure that all devices involved in an application have the same exact time, so that activities can be coordinated and data can be analyzed consistently.

In almost all systems there is the option of using NTP (Network Time Protocol) see article, a protocol widely used to synchronize computer clocks on IP networks. It uses a hierarchy of time servers synchronized with atomic time sources. For the LogicLab development environment we provide the FB SNTPClient which allows us to acquire the UTC value in Epoch time from an NTP server. As we have seen the time value returned by the NTP server is referred to UTC, to convert it to the time of our geographic location we can use the function SysDateLocalize which takes into account the time zone and any daylight saving time. By enabling NTP we ensure all systems are synchronized to the same time.

To use NTP you must have an Internet connection or have an NTP server in your network. For the LogicLab development environment, we provide the FB SNTPServer which provides the system's real time clock value as a time reference.

Daylight saving time

Another issue to consider in time management is precisely the transition between daylight saving time and summer time and vice versa. If the system performs time logs if we rely on the localized time, we will have that in the transition from standard time to daylight saving time we will miss all the logs from 2 to 3 and vice versa in the reverse transition we will have the logs from 2 to 3 repeated twice. That is why in this case it is better to always refer to UTC time even if it makes the log reading less immediate.

Don't miss the latest news !
By subscribing to the newsletter you will receive a discount coupon.
Sign up now !