Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410517

Re: "systemd[1]: Failed to apply local time delta" with v4.7-rc1

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: "systemd[1]: Failed to apply local time delta" with v4.7-rc1
Date 2016-05-31 20:30 +0200
Message-ID <rEWAp-6bM-3@gated-at.bofh.it> (permalink)
References <rEwcW-5hx-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 30, 2016 at 7:13 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> Hi,
>
> I noticed that when I boot my Lenovo Yoga 900 with v4.7-rc1 I get
> following error from systemd:
>
>   systemd[1]: Failed to apply local time delta, ignoring: Invalid argument
>
> and my system time is left being 180 minutes off.
>
> With following commits reverted it works fine:
>
>   86d3473224b0 time: Introduce do_sys_settimeofday64()
>   457db29bfcfd security: Introduce security_settime64()
>
> and systemd prints:
>
>   systemd[1]: RTC configured in localtime, applying delta of 180 minutes to system time.
>
> From systemd source code it seems to use Linux specific feature to "warp" the
> system clock according the timezone passed in:
>
>   clock_set_timezone() {
>         const struct timeval *tv_null = NULL;
>
>         ...
>
>         /*
>          * If the RTC does not run in UTC but in local time, the very first
>          * call to settimeofday() will set the kernel's timezone and will warp the
>          * system clock, so that it runs in UTC instead of the local time we
>          * have read from the RTC.
>          */
>         if (settimeofday(tv_null, &tz) < 0)
>                 return -errno;
>         if (min)
>                 *min = minutesdelta;
>
> With commit 86d3473224b0 it seems that do_sys_settimeofday() started returning
> -EINVAL when tv is NULL which seems to break the above.
>
> Is this intentional or am I missing something?

:(
No, that wasn't intentional. Thanks for the report. I'll try to sort
it out here shortly.

thanks
-john

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: "systemd[1]: Failed to apply local time delta" with v4.7-rc1 John Stultz <john.stultz@linaro.org> - 2016-05-31 20:30 +0200

csiph-web