From: "Dr. Werner Fink" <werner@suse.de>
To: Util-Linux <util-linux@vger.kernel.org>
Subject: Discussion on BIOS/CMOS/UEFI clock in local time
Date: Thu, 14 Feb 2013 13:30:47 +0100 [thread overview]
Message-ID: <20130214123047.GA12371@boole.suse.de> (raw)
Hi,
just before such a discussion I'd like to point the mail
https://lkml.org/lkml/2008/1/12/87
from Ted Ts'o in the mail thread
https://lkml.org/lkml/2008/1/8/195
In this mail he advises to set set the system clock before running
e2fsck on an ext3 and higher file system to avoid wrong timestamps.
As this problem can also occur with other journaling file systems
the way to avoid this is to correct the kernels assumption that the
BIOS/CMOS clock is running in UTC by using the the system call
settimeofday(2) with the tz_minuteswest field of the timezone
structure.
This may done with the hwclock option --systz or here with the
small warpclock utility in the initrd/initramfs. Now with the UEFI
specs (section 7.3) the local time will become more often the default
for the BIOS/CMOS clock.
This will raise twice a year the problem if or if the HW clock has
been corrected for DST on/off by the user or an other OS like Windows[tm].
First case requires to ask the user if or if the DST offset has been
corrected. Whereas in the second case I do not know where the other
OS stores its information about DST on/off.
With UEFI this could be solved as the EFI BIOS shows DST and TIMEZONE
entries. But AFAICS from the kernels source (3.7) the timezone is
simply ignored, compare with drivers/rtc/rtc-efi.c as well as with
drivers/char/efirtc.c in the functions convert_to_efi_time() and
convert_from_efi_time() ... also for the user space tools there
is no API to change e.g. the DST flag.
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
next reply other threads:[~2013-02-14 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 12:30 Dr. Werner Fink [this message]
2013-02-22 10:31 ` Discussion on BIOS/CMOS/UEFI clock in local time Karel Zak
2013-02-22 12:01 ` Alessandro Zummo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130214123047.GA12371@boole.suse.de \
--to=werner@suse.de \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox