iotagent-node-lib icon indicating copy to clipboard operation
iotagent-node-lib copied to clipboard

Add functionality: Fetch time from NTP server

Open SBlechmann opened this issue 4 years ago • 2 comments

Hey there,

I'd like to suggest to add the functionality of fetching the time from an external NTP server and adjust the "system" (real system or container time) accordingly (taking delays into consideration). This seems to be useful when handling latency-sensitive use cases. Just found something similar here: https://gitlab.hopu.eu/software/FIWARE/FIWARESecurity/-/blob/master/iotAgents/iotagent/node_modules/sntp/README.md

So would it be possible to add this functionality and create env-variables like: NTP_Server -> Server IP / URL where to find the server NTP_Port -> Port of the NTP service NTP_Frequency -> how often the time should be synchronized

I also think this functionality could be useful to all FIWARE components. Looking forward to your response :)

SBlechmann avatar Sep 06 '21 09:09 SBlechmann

IOTAs take time from the operating system, so it's the operating system who has to keep sync using NTP.

From my point of view, this issue is out of the scope of IOTAs.

fgalan avatar Sep 06 '21 10:09 fgalan

If I'm not running the host system on my own, how do I know where the host system fetches its system time from? I mean... The only thing I'd like to do is so synchronize the iota (platform / system) time with my devices' time.

SBlechmann avatar Sep 08 '21 08:09 SBlechmann