linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>, linux-kernel@vger.kernel.org
Subject: "systemd[1]: Failed to apply local time delta" with v4.7-rc1
Date: Mon, 30 May 2016 17:13:29 +0300	[thread overview]
Message-ID: <20160530141329.GB1743@lahna.fi.intel.com> (raw)

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?

             reply	other threads:[~2016-05-30 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 14:13 Mika Westerberg [this message]
2016-05-31 18:24 ` "systemd[1]: Failed to apply local time delta" with v4.7-rc1 John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160530141329.GB1743@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=baolin.wang@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).