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

Re: Time quandry when dual boot with WinXP Pro



On 10/21/2016 8:28 AM, Darac Marjal wrote:
On Fri, Oct 21, 2016 at 08:09:38AM -0500, Richard Owlett wrote:
I'm creating a preseed.cfg file for installing Debian 8.6 in a
dual-boot enviroment with some version of MS Windows. There are
two distinct use cases:
  1. Two of my machines with WinXP Pro SP3
  2. A remote (~1000 miles]friend with several machines - some
with WinXP, others with
     Windows 10 or later.

I have discovered on my WinXP machine that:
  1. WinXP _displays_ the correct time.
     "Date and Time Properties" - Time Zone set to
         (GMT-06:00)Central Time(US&Canada)
         Automatically adjust clock for daylight saving changes
  2. Debian 8.6 w MATE run from LIVE DVD _displays_ the correct
time
  3. Debian 8.6 w MATE installed from DVD 1 of 13 with aid of
custom preseed.cfg
     _displays_ a time 5 hours earlier.
     The _display_ is independent of whether
          d-i clock-setup/utc boolean true
                      *OR*
          d-i clock-setup/utc boolean false
     is used in the preseed.cfg file.

I'm confused.

If you're not using NTP to provide your time,

Mine are not. His I don't know.

then, at boot, the
operating system will query the "hardware clock" to see what time
it is. As the hardware clock can drift, operating systems will
also set the hardware clock to match the "system clock" at
shutdown time (the system clock is the time that the operating
system is using).

The problem comes that there is no way for the hardware clock
(HWClock) to report what timezone it was set to. There are
basically two options here:

1. The HWClock is set to "Local Time". In this case, the
operating system sees "12:23" as being "12:23 GMT" or "12:23 CST"
or whatever and attempts no translation of the clock.

2. The HWClock is set to "Universal Time" (which is a
non-geographical datum time zone, with no daylight changes). In
this case, the operating system sees "12:23" as ONLY being "12:23
UTC" and translates that into the local time zone by adding or
subtracting hours appropriately.

If you only have one operating system on your machine, either of
these methods is fine. If you have TWO (or more) operating
systems, though, then they SHOULD agree on what the time in the
HWClock represents. If Windows thinks it's local time, but Debian
thinks it's UTC, then you'll see five-hour shifts each time you
boot.

You've already found the setting in Debian, I see, so you
probably want to check it tallies with what Windows is using. For
that, look at the Registry Key
HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal.
If this is 1, then the HWClock is using UTC; if it is 0, then the
HWClock is set to local time.

On my system, regedit does not display that key. Instead it has

HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias
    HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\Bias

HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\StandardBias
with respective values of (300), (360), and (0)


Hopefully that helps.

It clarifies what's happening. For my pesonal machines it doesn't make much difference, will likely just go to UTC for both clock and displayed time.

For my friend's machines there are non-technical, as well as technical, issues involved.



Reply to: