back to article Windows Server 2019 tweaked to stop it getting clock-blocked

Microsoft Windows Server 2019, coming later this year, will include UTC-compliant leap second support, both for added and subtracted time. But there will be no smearing. Since 1972, leap seconds have been added to Coordinated Universal Time (UTC) to compensate for divergence with mean solar time (UT1) – which slows with the …

  1. Sgt_Oddball
    Coat

    Just in the nick of time

    I'm sorry, I'll leave. No need to push....

    Mines the one with 'a brief history of time' in the pocket.....

  2. Wellyboot Silver badge

    1 second

    leap seconds do get flagged up well in advance, so is it beyond the markets to just 'not' trade during the one (count it) second being added every so often?

    After all, who uses UT1 for anything in business.

    1. Jon 37

      Re: 1 second

      The issue is logs to check regulatory compliance. Accurate timestamping helps a regulator compare logs from separate companies, when they're investigating something.

      If you have a rule "no trading during the leap second", then you have to have logs to prove that you didn't trade during that leap second. So the systems generating the trading logs have to understand leap seconds and be able to log during that leap second. So you still have to do the same work to make your systems understand leap seconds.

      A "no trading during leap seconds" rule actually makes things more complicated - you STILL have to do the work to make your systems understand leap seconds, and then you have to go implement the "no trading during leap seconds" rule (along with ensuring no trades are in progress when the leap second starts, etc).

      1. Wellyboot Silver badge
        Thumb Up

        Re: 1 second

        +1 Cheers, I now have a slightly better understanding of how this regulatory system operates.

        I'm now thinking how do we progress beyond using this irregularly spinning rock as a base line and develop a non drifting alternative.

        1. Paul Crawford Silver badge

          Re: Wellyboot

          We already have well defined time scales for all cases, its just that many computer programmers don't know or care to use them.

          For a smooth linear atomic time scale we have TIA where there is a fixed epoch and time is simply atomic transitions from that point. No Earth-related movement is considered at all. Internally GPS uses a similar idea, but its epoch matched UTC in 1980 and the offset GPS-UTC (which changes with leap seconds) is part of the broadcast information.

          For Earth-related work we have always used one of the UT scales (UTC, UT1 and UT2) as they are related to mean solar time, and for as long as humans have bothered with time keeping the cycle of day and night has *defined* our sense of time and date. It is only in the last century or so that we have had access to clocks that are better then the Earth's rotational rate as a time base. Now we have some people saying:

          "Keeping track of leap seconds is too hard for computers to do (i.e. lazy programmers ignoring the long history of time keeping) so lets get rid of them as who cares if mean solar time is no longer mid-day?"

          But many people do care, and many systems relating to astronomy or satellite use already exist that are based around the previous internationally agreed definition of UTC being kept within 1 second of the Earth's rotation, so they would be broken by such a change.

        2. David Nash Silver badge

          how do we progress beyond using this irregularly spinning rock?

          We do have an alternative but the problem is not that we use the spinning rock as a base and it drifts, it's that we use a more regular source as a base, and it doesn't drift, therefore getting out of sync with the spinning rock, so if left uncorrected the point of highest sun wouldn't be at 12:00, eventually it would be sunny in the night time, and so on.

          1. stephanh

            Re: how do we progress beyond using this irregularly spinning rock?

            There are tons of applications which require accurate time but don't care a bit about what the spinning rock does. Makefile timestamps, log timestamps...

            Leave the translation from TIA to "on the morrow of the Ides of March" to some user interface layer.

          2. swm

            Re: how do we progress beyond using this irregularly spinning rock?

            Actually the sun is not at its highest at 12:00 noon. Depending on the time of year it varies by more than half an hour because the earth's orbit is not circular.

    2. Lee D Silver badge

      Re: 1 second

      Think also of OTP tokens and things like that.

      Don't account for leap seconds and in a couple of years time you are 30+ seconds out which means that no TOTP system (like Google Authenticator, banking apps, etc.) will generate the right codes if they are using different clocks that do (e.g. in a smartphone).

      Leap seconds aren't that hard, and assuming everything from "I'll just count the seconds and divide by 365" is as blinkered as these kinds of omissions. If you're designing a major operating system designed to do everything from trade stocks to secure servers to integrate on a mass scale, date and time is very important to get right and there are enough gotchas that you already have to design around it, rather than bodge it in later.

      UNIX started off on the right idea ("Store the number of microseconds that have elapsed since midnight 1/1/1970" and then account for all changes in the way that you DISPLAY them taking into account things like leap-seconds, time-zones, historical changes, etc. (i.e. convert to day, month, year, hour, etc.), not the way that you handle the number itself (which has little relation to real-time, but you can just increment it once a microsecond and have something else handle the logic of what that second was actually called - e.g. 01:59:59 or 01:59:60 or 02:00:00 etc.. when necessary.

      Trouble is that it means keeping an accurate historical and future list of every change (and mistake?) made in those interpretations, for every timezone on the planet, etc. That's why you always just pull in date and time conversion functions and the "tz" packages, and NEVER try to fudge your own even if you think you know everything.

      1. Steve Knox

        Re: 1 second

        Don't account for leap seconds and in a couple of years time you are 30+ seconds out which means that no TOTP system (like Google Authenticator, banking apps, etc.) will generate the right codes if they are using different clocks that do (e.g. in a smartphone).

        No. FTA:

        [Since 1972] To date, there have been 27 leap seconds added – when clocks show 23:59:60 rather than rolling over to 00:00:00 after 23:59:59. The other 10 seconds arrived as a bulk adjustment in 1972.

        Even including the 10-second block in 1972, that's 37 seconds over 46 years, or 0.8 per year. Even if we round up to 1/year, it would take 30 years to be 30 seconds out. By then you're likely to have replaced any system you're using for OTP 3-6 times over.

    3. JeffyPoooh
      Pint

      "...an interesting financial market hack..."

      "...support for negative leap seconds... (...could form the basis for an interesting financial market hack.)"

      The local newspaper called me to ask if I wanted to subscribe. I asked if they offered 'Early Delivery', and he replied that they offer several different 'Early Delivery' options. I inquired about the options and he told me, "A) By 6am, B) by 3am, C) one day early, or D) two days early." Two days early? You mean, like, Wednesday's newspaper delivered on the Monday? Yep, exactly that; for an extra $20 per month. I signed-up right there and then. For the past eight years I've been doing quite well in the stock market and lotteries.

  3. This post has been deleted by its author

    1. keith_w

      Re: "Microsoft has included support for negative leap seconds just in case."

      Don't forget the Moon! Lunar and, to a lesser extent, solar tidal forces have already slowed the Earth's rotation from 6hrs to 24hrs (approximately) and continue to do so, that will eventually tidally lock the Earth and the Moon together, thus ending the entire issue.

  4. Paul Crawford Silver badge

    Windows get proper NTP

    Really what they are saying is Windows server 2019 gets the sort of NTP based time keeping support that *NIX systems have had from the 90s?

    OK, the PTP support is a newer thing with most systems based on the 2008 spec but it also needs switches/routers that support it if you are doing it properly. As for Google's fugly fudge of time-smear - don't. Please just implement time keeping properly and actually test your systems on the infrequent but inevitable leap-second events.

    1. Robert Sneddon

      Testing it out

      There was a leap second added a couple of years ago. I happened to be at the local Hacklab that New Year's Eve and someone set up a Linux box command line job to see what it would report as the clock ticked over from 23:59:59 to 00:00:00. We didn't see 23:59:60 as we should have.

      1. Ken Moorhouse Silver badge

        Re: Testing it out: Hacklab New Year's Eve: 23:59:59 to 00:00:00

        It takes much more than a Leap Second to do Auld Lang Syne, that's why.

    2. david 12 Silver badge

      Re: Windows get proper NTP

      No *NIX systems in the 90's did not have 100-microsecond-accurate time keeping. Reference systems had microsecond-accurate NTP. Ordinary *nix systems had only milli-second accruate clocks, even if they were running ntp, if they even were on an NTP network. Even in the 90's, most *nix system only had dial-up internet access, and many didn't even have that.

      And windows servers could, of course, have accurate NTP installed, even in the 90's. Unless an accurate clock was also installed, there was no more point than on a similar *nix server.

      1. Paul Crawford Silver badge

        Re: david 12

        It is true you could install a 3rd party NTP build for Windows for some time now (e.g. from Meinberg), but it has taken a LONG time for Microsoft to get with decent time-keeping.

        But you are wrong about 90s UNIX systems, we had Sun machines in the mid 90s that had microsecond format clock reporting (via gettimeofday() calls) even though I think they actually used the RTC oscillator so had 30.5us tick steps from the "watch crystal" used behind them. So better than 100us there. However, it is possible that older Linux boxes were millisecond ticks but I did not have much experience of those until the mid 2000s by which time they were us resolution.

        Also this was in a university setting so we had a 2Mbit WAN and reasonable delay stability in the 90s, though of course small businesses and home use was still often dial-up until the 2000s and that would set a significant limit on time setting.

  5. Paul Crawford Silver badge

    NTP & networks

    Incidentally it is not symmetric network delays that cause errors for NTP and similar, but asymmetric ones. NTP knows the round-trip time so it knows if the server is correct what the maximum ambiguity is, and with several servers (always recommended) a bad clock or strange delays on one path can be seen and rejected.

    However if you have a system with an asymmetric delay on all paths (e.g. your ISP) then all clocks sources are biased by the same amount and so your server is set to a slightly wrong time. For example my home cable broadband system seems to have an asymmetry of around 3ms when compared to a local GPS-based server. As your round-trip delay is reduced (e.g. NTP server on LAN instead of over the WAN) then such errors are reduced.

    PTP is not a "magic" solution to this dilemma, but as it runs on the LAN only and normally via switches that are designed to accurately transfer delay information and with network cards employing hardware time tagging you get greatly reduced errors in all of the locations that NTP sees as one 'blob' of delay, leading to much higher accuracy.

    1. diodesign (Written by Reg staff) Silver badge

      Re: asymmetric networks

      Yup – made this clearer in the article. Thanks.

      C.

  6. J4

    Already below 100us in EU

    Only a minor point in the context of the article, but Mr Cuomo is a little off in his orders of magnitude for the EU. ESMA already requires single microsecond precision in Mifid 2 and envisages nanosecond precision during the expected lifetime of the regulations.

  7. Stevie

    Bah!

    I was going to make mocking sounds, but I just noticed my Samsung J3 is showing a time five minutes ahead of every other device in my office.

    Nice going Samsung. When did you turn off my automatic Date-Time synch feature?

  8. Anonymous Coward
    Anonymous Coward

    Just do what my company's IT folks do...

    "The servers and network will all be taken off-line tonight for twelve hours, because of - you know - the switch to/from Daylight Savings Time."

    Same approach would work for leap seconds. Just go off-line and reboot.

    ;-)

    1. stephanh

      Re: Just do what my company's IT folks do...

      After all, it's Windows, you were probably due for a reboot anyway.

      [ducks]

  9. Jay Lenovo
    Black Helicopters

    Every second counts

    Time is relative.

    For instance, it's time to go home, but my windows laptop wants to do an hour's worth of updates before shutting down.

    Obviously if had the proper time, it would know not to do so. Right?

  10. JJKing
    Facepalm

    I must be tired.

    And here I was wondering why Server 2019 was being cock blocked. Was Office 2019 not putting out?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like