[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] Re[2]: [gentoo-user] Server system date synchronizaion
From:       Paul Hartman <paul.hartman+gentoo () gmail ! com>
Date:       2013-04-26 22:11:53
Message-ID: CAEH5T2Of3p4=xMHKtySmFgMAvk=uvHjO5DTCDObv8OxQ1Rqe_w () mail ! gmail ! com
[Download RAW message or body]

On Fri, Apr 26, 2013 at 3:54 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> On 26/04/2013 22:46, the guard wrote:
>> Пятница, 26 апреля 2013, 22:41 +02:00 от Alan McKinnon <alan.mckinnon@gmail.com>:
>>> Do none of us here ever deal with Windows? :-)
>>>
>>> I notice that no-one has yet mentioned that Windows does not do ntp, as
>>> Windows does not do time right, doesn't do timezones right and I
>>> strongly suspect can't even do dates right (this latter still unproven)
>>>
>>> Windows time servers need some magic Microsoft thing called ENTP which
>>> is in no way related to the ntp we all know and love
>>>
>> It refuses to adjust time if you have a wrong date.   timezone is set in your system
>>
>
>
> I was thinking more along the lines of how Windows has no concept of UTC
> set in the hw clock and a local timezone, and how timezones are odd
> things like Harare/Pretoria instead of the official names like
> SAST GMT+2 as set by the scientific timekeeping community.
>
> How about daylight savings? Can Windows deal with that? Other than by
> just shoving the clock back and forward by an hour on the right days?

I've used windows for the past 25,000+ work hours at my job (I wish
that were an exaggeration) in an all-Microsoft corporate environment.
I dare not declare myself an expert in anything Windows so as not to
encourage more of it. :)

AFAIK the windows time service (w32time) does everything internally
and between machines using UTC, but translates to/from local time for
updating the hardware clock and the OS time. When daylight saving time
happens it just changes the clock, though I have heard of some sites
where the time change does not occur until the next time sync happens.
If DST happens when the machine is powered off, it changes it at the
next reboot (and usually pops up a little window to let you know what
has happened). Sometimes if you reboot multiple times on a DST
changeover day it can adjust the clock repeatedly...

If you haven't installed Windows Updates or are using an unsupported
version, your DST and time zone info may be outdated. For example, in
the US about 10 years ago they changed the start and end of DST by a
few weeks. Any devices using the old logic will be wrong for about a
month out of the year. If someone manually "fixes" the time on their
workstation, it will be correct until it changes itself and then it'll
be wrong again. :)

Also, being Windows, people tend to set the wrong time zone, don't
check the "use daylight saving" box, choose Central America
(continent) instead of Central US (country) time zone, etc. Then they
send out meeting invitations in Outlook and the time gets shifted by
the Exchange server and everybody shows up to a conference room an
hour early, except for the person who organized the meeting,
naturally.

Time sync has been built into Windows since Win 2000, and machines who
are part of a domain sync time with their domain controller using some
proprietary protocol called NT5DS. If you have admin rights you can
edit the registry and change it to use plain old NTP and sync with a
regular NTP server. The DC can sync with other DCs or standard NTP
server(s) over the internet. Home machines w/o a domain can set an NTP
server in the date and time settings without messing with the
registry, I think. (I don't use Windows at home.)

The time sync service by default changes the time gradually, taking up
to an hour to make the adjustment when there is a difference. Not sure
if there is an upper limit where it refuses to adjust if it's "too
wrong". You can also force an immediate sync in those cases.

There is a multi-purpose time utility built-in to windows called
w32tm.exe that lets you do various time operations, giving some
insight into the way Windows sees the world. I can do things like:

C:\Windows\system32>w32tm /tz
Time zone: Current:TIME_ZONE_ID_DAYLIGHT Bias: 360min (UTC=LocalTime+Bias)
  [Standard Name:"Central Standard Time" Bias:0min Date:(M:11 D:1 DoW:0)]
  [Daylight Name:"Central Daylight Time" Bias:-60min Date:(M:3 D:2 DoW:0)]

The interesting part there is UTC=LocalTime+Bias. So that seems to be
how they handle that. The other lines show what it knows about when
DST kicks in and the additional bias.

C:\Windows\system32>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 4 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.2329102s
Root Dispersion: 0.3298777s
ReferenceId: 0x0A010046 (source IP:  10.1.0.70)
Last Successful Sync Time: 4/26/2013 10:37:44 AM
Source: DC1.example.com
Poll Interval: 15 (32768s)

Tells me about the time sync status on my workstation and info about
the last sync.

C:\Windows\system32>w32tm /stripchart /computer:time-a.nist.gov /samples:10
Tracking time-a.nist.gov [129.6.15.28:123].
Collecting 10 samples.
The current time is 4/26/2013 4:08:03 PM.
16:08:03 d:+00.0467925s o:-00.2902514s  [                          *|
                         ]
16:08:05 d:+00.0623842s o:-00.2958840s  [                          *|
                         ]
16:08:07 d:+00.0311857s o:-00.2882881s  [                          *|
                         ]
16:08:09 d:+00.0467864s o:-00.2917686s  [                          *|
                         ]
16:08:11 d:+00.0467916s o:-00.2846576s  [                          *|
                         ]
16:08:13 d:+00.0467925s o:-00.2963050s  [                          *|
                         ]
16:08:15 d:+00.0467925s o:-00.2963291s  [                          *|
                         ]
16:08:17 d:+00.0467919s o:-00.2949080s  [                          *|
                         ]
16:08:19 d:+00.0467897s o:-00.2966004s  [                          *|
                         ]
16:08:21 d:+00.0311927s o:-00.2887318s  [                          *|
                         ]

Measuring differences between my machine and another one. Notice here
I'm querying one of the same standard time servers I sync with on my
Gentoo machines.

Now we return to our regularly-scheduled programming...

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic