userspace: fix wr_date to mark tai_offset even at startup
Also, run "wr_date get" at boot once, so it parses leap-seconds.list
and configures the kernel for the proper tai_offset.
With the previous commit it worked with "wr_date get tohost",
becase after the host is correctly in 2014 or so, all leap seconds are
in the past. But if we are not synced, the host is in 1970 and
no leap second has already happened.
If this code is unchanged in 2018, we'd better be off by 2 seconds
than 37, so if linux reports a date earlier than 2014, use 2014 and
fix tai_offset at 35.
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
Please register or sign in to comment