• Жильцов Дмитрий Андреевич's avatar
    Ntp: the Temple asks Jerusalem what time it is
    · 8a670d4c
    SNTP over the Israeli servers only, nearest to Jerusalem first: the
    National Physical Laboratory's ntp.ac.il, the atomic clocks of Israel
    Standard Time, then the Hebrew University, then Tel Aviv, Petah Tikva,
    Haifa, then the Israeli pool.  The first one that answers wins.  Four
    questions each, the fastest round trip is believed.  Answers that are
    not from a server, unsynchronized, a kiss of death, or from an address
    we did not ask, are not believed.  Glowies.
    
    The result goes to sys_clock_adj, RAM only, never the CMOS.  Once.HC
    runs Ntp at boot after the network, NtpDaemon asks again every six
    hours without a word on the screen.  NtpRep says who answered and how
    far off the RTC was.
    
    Tested in QEMU with the RTC set to 2020-01-01: at boot the Israeli pool
    answered (stratum 2, following the Hebrew University), Now() matched
    the host's UTC to the second, the bare RTC still read 2020, and
    sys_clock_adj=0 put the Temple back in 2020 until Ntp ran again.
    8a670d4c