Commit graph

15 commits

Author SHA1 Message Date
Karel Zak
7528fae9e9 include/pathnames: rename _PATH_ADJPATH to _PATH_ADJTIME
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-26 11:45:45 +01:00
Joseph Parmelee
d53f8ecfbf hwclock: make hwclock leap-second-aware
Attached is a patch file leap_seconds.patch against util-linux-2.22.2
that allows leap seconds to be included in hwclock --show or --hctosys.
The current code uses the default UTC zonefile in reading the hardware
RTC with mktime().  This zonefile usually does not include leap
seconds.  As of this date there have been a total of 25 leap seconds
added since the epoch (start of 1970).  This is particularly a problem
for systems using ntp to maintain their system clocks because ntp does
take leap seconds into account.  A user can specify a leap-second-aware
zonefile via /etc/localtime.  By defining the environment variable
TZUTC, mktime() can be induced to use a matching UTC zonefile that
includes leap seconds.  The default behavior (TZUTC undefined) is
unchanged.

Regards,

Joseph Parmelee
jparmele at wildbear.com
2013-03-18 10:31:32 +01:00
Sami Kerola
c2f0a85671 hwclock: make usage() change translator friendly
The --compare option from 83765871ef is
made to be separate fputs() line.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-25 16:40:05 +01:00
Benno Schulenberg
8c219bf463 textual: gettextize several overlooked messages
Also improve the clarity of some of them.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-25 11:47:29 +01:00
Karel Zak
f7b59bb27f hwclock: fix in usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-03 11:41:52 +02:00
Tom Gundersen
910a090039 hwclock: don't warp the systemtime if the RTC is in UTC
A sideeffect of 839be2ba6b is that we now
warp the systemtime according to the timezone, on the first call of
--systz. This is not always the correct thing to do, and causes a
regression for us in Arch Linux.

The behavior is correct if the RTC, and hence the systemtime, is
in localtime. However, if the systemtime is already in UTC we don't
want to touch it when we set the kernel timezone (which we still need to
do as some filesystems use this information).

An almost identical issue was also fixed in systemd commit
72edcff5db936e54cfc322d9392ec46e2428fd9b.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-09-21 12:07:32 +02:00
Ondrej Oprala
83765871ef hwclock: add a new --compare option
The new option imitates adjtimex -c functionality and outputs
the drift in 10 second intervals.

[kzak@redhat.com: - coding style
                  - print hw and system time columns too]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-10 16:00:27 +02:00
Karel Zak
dade002ab0 hwclock: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:25:48 +02:00
Sami Kerola
289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Karel Zak
839be2ba6b hwclock: don't set time for --systz
Not sure why, but the current --systz uses non-NULL timeval for
settimeofday(). It means that build-in kernel warp clock mechanism is
not used and the system time is always modified.

The built-in kernel implementation allows to move the clock by
timezone only for very first settimeofday() call.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-04 13:43:51 +02:00
Karel Zak
c7f753901f build-sys: move hwclock to sys-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak
7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak
5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak
2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak
fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00