Re: [arch-dev-public] [signoff] initscripts-2011.04.1-2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Apr 29, 2011 at 8:41 PM, David Rosenstrauch <darose@xxxxxxxxxx> wrote:
> Can someone pls clarify what exactly is broken about localtime?  I've been
> using it for years without any (noticable) issue.  I'll be happy to switch
> over if I need to, but I'd like to understand the problem(s) first.

There are some implementational problems and some conceptual ones.
Please have a look at the link I gave to the systemd page for a brief
description as well as
<http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html> for the very
interested.

In short (sorry for any mistakes or omissions):

In linux we have (at least) two clocks, the hardware clock and the
system time. The system time is what matters when the computer is
running and this is always in UTC, the hardware clock is what
remembers the time for us when the computer is switched off and this
is what we are discussing now. It may be in localtime or in UTC.

When we turn the computer on we have to instantiate the system time
from the hardware clock. If the hardware clock is in UTC this is
straightforward, but if it is in localtime it is impossible. Well, it
is impossible to get it right all of the time, but it almost always
works out ok (that's why most people will never notice).

There are (at least) two reasons for the problems and they both have
to do with daylight saving time:
1) as I said, when the computer starts we need to take the time from
the hardware clock and adjust for the timezone to get the time in UTC.
However, imagine that your hardware clock tells you it is half past
two in the morning on the day the clock should be adjusted back by one
hour. What time is it in UTC? There is no way to know (it depends on
whether the clock was adjusted back half an hour ago, or if it should
be adjusted back in half an hour). This problem occurs in a one hour
window every year.
2) if you are dual-booting, who should correct for DST? Usually both
OS'es will, and then we are off by one hour. If you decide that only
one should do it then we are off by one hour if we start the wrong one
first, etc. This problem occurs twice every year.

HTH,

Tom


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux