I have an embedded system which synchronizes UTC locally using NTP. One of the clients in the system acts as time reference for the other clients. I guess you could think of it as stratum 0. A program on this "NTP server" may get a message to set time from one of many potential time sources, such as GPS system or somebody setting a new time through the UI. New time does not come as an actual NTP message on NTP port 123.
I've been searching for a while how to set the ntpd time without success. I'm thinking a
popen() doing something-something should do the trick, but the internet seems all focused on how to adjust time to external server, not configuring a local system.
How do I set ntpd server time without referencing an external NTP server?
As an example use case, the time source may be one of these: docs.novatel.com/oem7/Content/Home.htm (a GNSS reciever). This is just one possible configuration. Other customers use their own separate time sources. It does not include an NTP server, so I would have to implement one from scratch.