diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-24 20:23:07 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-24 20:23:07 +0200 |
commit | 7948c4dfbea73ac21250b588089039aa17a90386 (patch) | |
tree | affd1ba0a14936f4c19452fd1219c8c65dc137fc /units/hwclock-load.service | |
parent | 359306dfe552228716b8da5cf989da8d0e23a297 (diff) |
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.
Diffstat (limited to 'units/hwclock-load.service')
-rw-r--r-- | units/hwclock-load.service | 34 |
1 files changed, 0 insertions, 34 deletions
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 |