How to coordinate the clock when dual-booting with Windows

Kevin O'Gorman kogorman at gmail.com
Mon Dec 11 23:35:53 UTC 2017


On Mon, Dec 11, 2017 at 2:48 PM, Kevin O'Gorman <kogorman at gmail.com> wrote:

> On Mon, Dec 11, 2017 at 1:07 PM, Drew Einhorn <drew.einhorn at gmail.com>
> wrote:
>
>> This is interesting, but I'm uncertain how to use it.  I found the list
>> of servers in the registry.  I didn't put them there, but there are 5, and
>> number 5 appears as the default.  It is time-b.nist.gov which I sure
>> hope is not unreliable.  However, I still get Windows showing the time off
>> by 8 hours when it boots up, and I'm supposing that's because it is using
>> the time in the BIOS DRAM, but I'm unsure because as near as I can tell the
>> BIOS is set to local time; at least that's what I see when I'm in BIOS
>> setup.  Frankly I'm all confused.
>>
>> It would be nice if Windows would use nist.gov and apply the timezone,
>> ignoring BIOS completely.
>>
>> --
>> Kevin O'Gorman
>> #define QUESTION ((bb) || (!bb))   /* Shakespeare */
>>
>> Please consider the environment before printing this email.
>>
>> NTP is probably assuming system clock is UTC and correcting based on your
>> time zone settings. This way ntp can assume all clocks are UTC and not have
>> figure out all the relevant time zone corrections.
>>
>> Does this make sense for your time zone?
>>
>> Remote users can set their time zone environment variables for their
>> local time zone. Things work out nicely on Unix or Linux based systems.
>>
>> I don't know If there is a right way to configure Windows so it knows the
>> hardware clock is UTC and the user time zone is different. If not, you have
>> different issues depending on whether the hardware clock is UTC or local
>> time. You may have to decide which issues are the bigger problem.
>>
>> Windows may screw things up for spring and fall daylight savings
>> adjustments, if Windows thinks the hardware is on local time when it's
>> really on UTC.
>>
>> If the latest updates are not installed, your systems may change to or
>> from daylight savings on the wrong weekend. This can be an issue for all
>> operating systems.
>>
>> My daughter's alarm clock switched itself from daylight savings time to
>> standard time on the wrong weekend this year. And, there is no way to
>> update the rules for when to change.
>>
>
> I reorganized this reply.  Please bottom-post on the list.
>
> What you say sounds good, but it's a bit confusing to me.  Both Windows
> and Linux are NTP-capable, so when you write "NTP is ...." you don't say
> which one you mean.  But I take it you're writing about Linux NTP, and what
> you wrote agrees with what I think I knew about Linux.  I am not aware of a
> way to configure Windows to do what Linux does, but there's been some talk
> about making Linux do what Windows does instead.  I thought I had done it
> but it didn't work, and now I have a situation I don't understand at all.
> Follow along with me....
>
> I'm running Linux and Linux thinks it's 2 PM on Dec 11 PST.  Which it is.
> I reboot and enter BIOS setup.  BIOS thinks it's 2 PM on Dec 11, which it
> still is in this time zone but AFAIK BIOS has no concept of time zones.
> Maybe my fix worked and linux is storing local time.  But wait, let's check.
> I boot into Windows.  Windows thinks it's 6 AM on Dec 11, which is 8 hours
> off.  I didn't think Windows could do that, as I wrote above.
> So I fix it.  Windows now thinks it's 2 PM on Dec 11.  I reboot.
> In BIOS, the time is 22:xx (10 PM). off by 8 hours.  So Windows changed
> the BIOS time either when I changed the time or when it shut down, or both,
> and set it to UTC based on Windows' knowledge that we're in the UTC-8:00
> zone.
> Linux comes up and thinks it's 2 PM on Dec 11 PST.  Which it is.  But this
> is weird.  I was expecting it to accept the BIOS time of 10 PM as being
> local time.
>
> On a hunch, I ran ntpdate, and here's a new piece of the puzzle:
> 11 Dec 14:37:01 ntpdate[6074]: no servers can be used, exiting
>
> So now I think I should be configuring NTP.
>
> /etc/ntp.conf contains a few lines that look like NTP servers.  They must
> have come with the distro:
> # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
> # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
> # more information.
> pool 0.ubuntu.pool.ntp.org iburst
> pool 1.ubuntu.pool.ntp.org iburst
> pool 2.ubuntu.pool.ntp.org iburst
> pool 3.ubuntu.pool.ntp.org iburst
>
> # Use Ubuntu's ntp server as a fallback.
> pool ntp.ubuntu.com
>
> So why are no servers usable?  Is it possible my router is blocking NTP?
> Is it possible the standard config file is bad?  This is Ubuntu 16.04.3.
>
> Clues, anyone?
>
>
> Hmm.  It's not quite as bad as i though, but it's still every bit as
confusing.  Reaching back in my memory I came up with:

$ ntpq -p
     remote           refid      st t when poll reach   delay   offset
jitter
==============================================================================
 0.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000
0.000
 1.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000
0.000
 2.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000
0.000
 3.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000
0.000
 ntp.ubuntu.com  .POOL.          16 p    -   64    0    0.000    0.000
0.000
-104.131.155.175 171.66.97.126    2 u  693 1024  377   19.169   -0.267
3.126
*ntp.your.org    .CDMA.           1 u  118 1024  377   73.945    1.636
2.191
+chl.la          127.67.113.92    2 u 1336 1024  376   22.897    3.010
2.547
+time.tritn.com  198.60.22.240    3 u  158 1024  377   21.207    5.454
2.769
-pacific.latt.ne 199.233.236.226  3 u  923 1024  377   11.997    1.665
3.041
$

So NTP is working okay (although the ubuntu pool may not be,) but ntpdate
is not.  I wonder why?

-- 
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20171211/0a927351/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20171211/0a927351/attachment.gif>


More information about the ubuntu-users mailing list