How does the time zone info get updated?
Rodney W. Grimes
freebsd-rwg at gndrsh.dnsmgr.net
Tue Jan 5 15:41:30 UTC 2021
>
> It gets distributed with the base packages, but I haven't figured out how to
> keep it up to date.
>
> The info is distributed via IANA.
> https://www.iana.org/time-zones
>
> It gets updated several times a year. There were 6 during 2020. When is
> unpredictable, often shortly after some government passes a law to change
> something with short notice.
>
> I'd expect there to be some mechanism to track the updates but I haven't found
> it.
>
> The tz database includes the leap-seconds.list file. That gets updated every
> 6 months. I'd like to get whatever FreeBSD does for time zones to include
> that file so ntpd can use it without having to be concerned with keeping it up
> to date. That only works if the zone info is kept up to date.
This only addresses the leap-seconds file, not the whole zoneinfo data:
/etc/periodic/daily/480.leapfile-ntp calls "service ntpd onefetch",
which is /etc/rc.d/ntpd, the onefetch command attempts to update
the leap-second file.
This works great if you have https support avaliable via the ca_root_nss
port, if you do not then you can fix this to fetch via http by overriding
ntp_leapfile_sources in /etc/rc.conf like so:
ntp_leapfile_sources="http://www.ietf.org/timezones/data/leap-seconds.list"
^ remove s here
This is the only file you need to keep up to date to keep ntpd happy.
--
Rod Grimes rgrimes at freebsd.org
More information about the freebsd-hackers
mailing list