summaryrefslogtreecommitdiff
path: root/units/hwclock-load.service
blob: 4deb5c10c711b22a9ccecbd04192bbeb8c38a0bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#  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
Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service
Before=sysinit.target shutdown.target udev.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/hwclock --systz
StandardOutput=syslog

# Note the weird semantics if 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