From 7894bf0f08740f75610990a2ba76af7a7cbce61e Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Mon, 21 Feb 2011 13:27:07 +0000 Subject: hwclock: make RTC default to UTC time If /etc/adjtime doesn't specify UTC or LOCAL, rtcwake defaults to UTC and hwclock defaults to LOCAL. Switch hwclock to meet the behaviour of rtcwake (default=UTC), also matching the kernel's CONFIG_RTC_HCTOSYS behaviour. The user impact of this change should be minimal, as anyone who has run "hwclock --systohc" before will have their UTC/LOCAL choice already recorded in /etc/adjtime. Signed-off-by: Daniel Drake --- hwclock/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hwclock/hwclock.c') diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c index 279b672f9..88fb8a073 100644 --- a/hwclock/hwclock.c +++ b/hwclock/hwclock.c @@ -224,8 +224,8 @@ hw_clock_is_utc(const bool utc, const bool local_opt, else if (local_opt) ret = FALSE; /* --localtime explicitly given */ else - /* get info from adjtime file - default is local */ - ret = (adjtime.local_utc == UTC); + /* get info from adjtime file - default is UTC */ + ret = (adjtime.local_utc != LOCAL); if (debug) printf(_("Assuming hardware clock is kept in %s time.\n"), ret ? _("UTC") : _("local")); -- cgit v1.2.3-55-g7522