From 7948c4dfbea73ac21250b588089039aa17a90386 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 24 May 2011 20:23:07 +0200 Subject: rtc in localtime: use settimeofday(NULL, tz) instead of hwclock(8) We check for LOCAL in /etc/adjtime and if needed, ask the kernel to apply the timezone delta to the system clock. The very first call of settimeofday() without a time, but a timezone warps the system clock, so that it properly runs in UTC. --- units/hwclock-load.service | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 units/hwclock-load.service (limited to 'units/hwclock-load.service') diff --git a/units/hwclock-load.service b/units/hwclock-load.service deleted file mode 100644 index f278a671a3..0000000000 --- a/units/hwclock-load.service +++ /dev/null @@ -1,34 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -[Unit] -Description=Apply System Clock UTC Offset -DefaultDependencies=no -Wants=time-sync.target -Conflicts=shutdown.target -After=systemd-readahead-collect.service systemd-readahead-replay.service -Before=sysinit.target shutdown.target udev.service time-sync.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/sbin/hwclock --systz -StandardOutput=syslog - -# Note the weird semantics of hwclock and the kernel here: the first -# settimeofday() invocation from userspace is special and may be used -# to set the offset from UTC of the system clock. It is independent -# of any specific RTC device. This is mostly a crufty hack to support -# legacy operating systems which insist on storing local time in the -# RTC. - -# Note that we do not run --hctosys here, we assume the kernel -# includes a compiled in RTC module which is used to initialize the -# system time as part of kernel setup. - -[Install] -WantedBy=sysinit.target -- cgit v1.2.3-54-g00ecf