Hi Patrik,
> On Mon, 2014-03-24 at 18:20 +0800, Chengyi Zhao wrote: > > ConnMan can't set the hardware clock from the current system time, > > when user has modified the system time, the time is unable to be saved > > after reboot. > > That is correct. > > > Can the functionality of setting the hardware clock be added to > > ConnMan? (It is similar to the shell "hwclock -w".) > > No. ConnMan has nothing to do with any variants of hardware clocks. > Using NTP, ConnMan keeps the system time properly synchronized to UTC. > It's up to the rest of the operating system to synchronize system time > with the hardware clock when booting and shutting down. > > Thanks a lot. But Ossama has some ideas: -------------------------------------- Patrik's comment assumes that automatic time updates are enabled in Connman and/or NTP is configured. I don't believe his comment applies when automatic updates are *disabled*. In that case, the user will set the time manually. It seems reasonable to expect that time won't be lost at reboot. Connman probably shouldn't provide a means to set the date and time *manually* if it isn't going to save that time to the hardware clock. Without the save to the hardware clock the manual date/time support in Connman is essentially a redundant and unnecessary D-Bus call around the settimeofday(2) <http://linux.die.net/man/2/settimeofday> system call. If desired we can work around this limitation by having the native date/time setting code set the time in the hardware clock via /dev/rtc<http://linux.die.net/man/4/rtc>or through timedated <http://www.freedesktop.org/wiki/Software/systemd/timedated/>. Either way, the calling process will need the appropriate privilege ( CAP_SYS_TIME <http://man7.org/linux/man-pages/man7/capabilities.7.html>). ----------------------------------------- Cheers, Chengyi _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman