View Single Post
Old 12-23-2019, 11:13 PM   #15
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You... kinda don't have to?

ntp uses settimeofday()/adjtime()
date uses gettimeofday()

As long as you do things in order (i.e., ntpdate -> date +%s -> setdate: ntp sets, date gets, setdate sets to what date returned), everything will be coherent.

If it isn't, your NTP setup is borked (and/or you have extra TZ/DST shenanigans to take care of first).

----

Or, just try @knc1's extension, which goes with ntpdate -> hwclock -w

Last edited by NiLuJe; 12-23-2019 at 11:22 PM.
NiLuJe is offline   Reply With Quote