Linked by Thom Holwerda on Wed 18th Jul 2018 22:25 UTC
Windows

Microsoft is bringing support for leap seconds - yes, that one extra second - to Windows, starting with Windows 10 Redstone 5 and Windows Server 2019. With the upcoming updates for Windows 10, Microsoft's operating system now deals with leap seconds in a way that is incredibly accurate, UTC-compliant, and traceable.

Leap seconds typically occur every 18 months, resulting in one extra second. The extra leap second occurs to adjust with the earth’s slowed down rotation, and an extra second is added to UTC in order to keep it in-sync with mean solar time. To deal with the extra second more appropriately, Windows 10 will now display that extra second, instead of directly jumping to the next one, making it the world's first OS to have full support for leap seconds.

I didn't know operating systems didn't fully support leap seconds. That is a big surprise to me.

Order by: Score:
No need
by andywoe on Wed 18th Jul 2018 23:12 UTC
andywoe
Member since:
2018-05-18

For most consumers, NTP handles it just fine for you.

Google does it differently, they "easy-in" the leap second by distributing the 1000 milliseconds over the day to avoid issues with some software when a sudden jump comes.

Reply Score: 1

RE: No need
by Drumhellar on Thu 19th Jul 2018 22:04 UTC in reply to "No need"
Drumhellar Member since:
2005-07-12

This obviously isn't something meant to benefit most consumers.

Since your clock is synced to NTP only periodically, that means when the leap second occurs, your clock is wrong for several hours after the leap second occurs between syncs.

For some use cases, this isn't allowed.

They way Google does it is also wrong - it means your clock is wrong all day.

In addition to handling leap seconds, Microsoft is also integrating support for PTP, which is a much higher precision time protocol.

Whereas NTP can synchronize to less than a millisecond on a local network, PTP is capable of sub-microsecond precision.

Reply Score: 3

Good reason for no support
by JLF65 on Thu 19th Jul 2018 02:16 UTC
JLF65
Member since:
2005-07-06

Because the Earth's rotation speed varies in response to climatic and geological events, UTC leap seconds are irregularly spaced and unpredictable. Insertion of each UTC leap second is usually decided about six months in advance by the International Earth Rotation and Reference Systems Service (IERS), when needed to ensure that the difference between the UTC and UT1 readings will never exceed 0.9 seconds.

So there's really no way to automatically determine leap seconds without having someone signal them over the net... which I imagine MS is now doing for W10. Network time protocol already handles leap seconds, and you can bet most linux/OSX people are using that, and the ones that aren't could care less about leap seconds.

Reply Score: 1

RE: Good reason for no support
by Brendan on Thu 19th Jul 2018 11:27 UTC in reply to "Good reason for no support"
Brendan Member since:
2005-11-16

Hi,

So there's really no way to automatically determine leap seconds without having someone signal them over the net... which I imagine MS is now doing for W10. Network time protocol already handles leap seconds, and you can bet most linux/OSX people are using that, and the ones that aren't could care less about leap seconds.


There's a lot more to handling leap seconds than just knowing when the next one will occur. For a simple example, consider (accurately) calculating how much time passed between file system time stamps when one file is a few years older than another.

Of course usually it causes a whole pile of bugs to surface (due to people assuming there's always 60 seconds per minute) where times will get stored wrong or displayed wrong during the extra 61st second.

- Brendan

Reply Score: 3

RE[2]: Good reason for no support
by JLF65 on Thu 19th Jul 2018 15:12 UTC in reply to "RE: Good reason for no support"
JLF65 Member since:
2005-07-06

While that's true, there has been 27 leap seconds added since they started. I'm not aware of any financial terms that work on seconds... or minutes... maybe hours for loan sharks. I don't have a single account that's updated less than monthly. So the worst that happens is what? Your account is updated 1 second later than you expected?

Reply Score: 1

RE[2]: Good reason for no support
by Alfman on Fri 20th Jul 2018 17:40 UTC in reply to "RE: Good reason for no support"
Alfman Member since:
2011-01-28

Brendan,

Of course usually it causes a whole pile of bugs to surface (due to people assuming there's always 60 seconds per minute) where times will get stored wrong or displayed wrong during the extra 61st second.


I can not agree with the semantics of that, haha. All minutes are 60 seconds by definition. Leap seconds used to resync time to the earth's movement are just that, it doesn't change our units of measurement. If it did it would result in chaos, we'd have people breaking records in those long minutes. Other units like RPM would likewise be messed up by those 61second minutes. I say nay, all minutes are 60 seconds and it is not a bug. Rather we have to accept the reality that every time we resync our time to earth reference, it represents a discontinuity between time frames.

The reason we have this mess in the first place is because society has shoehorned the same time units into two incompatible applications: representing earth's motions through space, versus representing constant scientific units. Earth days are certainly useful for managing our calendars, but it's highly unfortunate that we've conflated different types of time measurement. Just think, this whole problem would go away if we stopped conflating units of time. Computers could just track calendar days (and fractions of days) to represent date/time stamps. NTP could fix any tiny discrepancy between earth's movement on a daily basis and all computer time would be in perfect harmony because there's no false assumption that a day precisely equals a constant time.

Reply Score: 2

RE[3]: Good reason for no support
by Brendan on Sat 21st Jul 2018 13:02 UTC in reply to "RE[2]: Good reason for no support"
Brendan Member since:
2005-11-16

Hi,

I can not agree with the semantics of that, haha. All minutes are 60 seconds by definition.


No (or maybe yes, depending on whether you make up a non-standard definition).

For "theoretically possible" definitions; there are two main categories - a second is always exactly the same length (and therefore the number of seconds per day must vary extremely slightly), or the length of a second varies (and therefore the number of seconds per day remains the same and you don't have any leap seconds at all). The first definition is used by everything, partly because there's a set of equations that link all units (time, distance, speed, acceleration, charge, pressure, power, torque, ...) into a single system, where if seconds varied the entire system of equations would be broken.

For the official UTC standard; when a leap second occurs the last minute of that day is 1 second longer (or 1 second shorter, but that never happens). For a 24-hour clock; it's literally meant to go "23:59:59, 23:59:60, 0:00:00".

Unfortunately; "Unix standard time" is a different standard - it doesn't follow UTC (and is amazingly idiotic). In this case, when they jam the 61st second into the last minute of the day the same time/s happen twice (e.g. "23:59:59.0" happens once at the start of the 60th second and then happens again at the start of the 61st second), and you get time going backwards briefly (e.g. from "23:59:59.123" to "23:59:59.0 again") which is nasty for anything not expecting "now - then" to be negative.

- Brendan

Reply Score: 3

RE[4]: Good reason for no support
by Alfman on Sun 22nd Jul 2018 06:53 UTC in reply to "RE[3]: Good reason for no support"
Alfman Member since:
2011-01-28

Brendan,

For "theoretically possible" definitions; there are two main categories - a second is always exactly the same length (and therefore the number of seconds per day must vary extremely slightly),


Yes, agree. This should be no surprise though since the earth's rotation is not constant and may change as a result of geological changes to the earth (ie dams that hold water on different latitudes, melting ice, moon and tides, etc).

or the length of a second varies (and therefore the number of seconds per day remains the same and you don't have any leap seconds at all). The first definition is used by everything, partly because there's a set of equations that link all units (time, distance, speed, acceleration, charge, pressure, power, torque, ...) into a single system, where if seconds varied the entire system of equations would be broken.


Well, these are the two incompatible uses of time I referred to. Using the same units for both things breaks the units for one use case or the other. There wouldn't be a problem if we hadn't done that in the first place. Ah but we did...live and learn.


For the official UTC standard; when a leap second occurs the last minute of that day is 1 second longer (or 1 second shorter, but that never happens). For a 24-hour clock; it's literally meant to go "23:59:59, 23:59:60, 0:00:00".



It's a bad solution for the majority of computer software with more potential harm than gain. Leap seconds break expectations and are unpredictable. Because of this, timestamp algorithms based on leap seconds will break unless they get updated regularly. Earth scientists release a leap second schedule about six months in advance.


https://en.wikipedia.org/wiki/International_Earth_Rotation_and_Refer...



Unfortunately; "Unix standard time" is a different standard - it doesn't follow UTC (and is amazingly idiotic). In this case, when they jam the 61st second into the last minute of the day the same time/s happen twice (e.g. "23:59:59.0" happens once at the start of the 60th second and then happens again at the start of the 61st second), and you get time going backwards briefly (e.g. from "23:59:59.123" to "23:59:59.0 again") which is nasty for anything not expecting "now - then" to be negative.


I disagree, it's the leap seconds that are nasty, unix time stamps are quite nice if we don't try to do nonsensical things like jamming 61 seconds into a minute. This goes back to conflating units; if we stop pretending that earth movement based time units = scientific time units, then the problems go away.

Leap seconds are problematic for a whole host of applications that can't handle extra seconds. I'm not the only one who thinks so, many of us in computer science would like to abolish them:

https://en.wikipedia.org/wiki/Leap_second#Proposal_to_abolish_leap_s...


The simplicity of unixtime is a beautiful thing, it only broke once we started adding discontinuities in clock time, which also breaks practically every clock in the world(albeit by one second every now and then).


IMHO the simplest solution is best: accept the physical reality that clock time based on earth's rotation is "off" ever so slightly and simply use NTP to continually update the clock normally without leap seconds at all. We should never suddenly add/subtract whole seconds in an unexpected way as leap seconds do, that is a terrible practice we should abolish. The benefit of this "do less" approach is clear: all computers/software can trivially keep their clocks in sync with no discontinuities or exceptions. Since the "earth drift" is well within the margins of error for CMOS clocks anyways, the change would be imperceptible to just about all applications that need a time stamp.

http://www.ntp.org/ntpfaq/NTP-s-trbl-spec.htm#AEN5674

Reply Score: 2

PROGRESS!
by piratepuppy on Thu 19th Jul 2018 12:43 UTC
piratepuppy
Member since:
2018-07-10

First notepad, now adding leap second support? WOW! Microsoft is really on a roll here. I expect full market domination in just a few years if they keep up this unprecedented level of technological advancement.

Reply Score: 2

Reminds me...
by mikad on Thu 19th Jul 2018 14:17 UTC
mikad
Member since:
2007-12-28

Rant about computers and timezones:

https://www.youtube.com/watch?v=-5wpm-gesOY

Leap second mentioned at 6:47 ;)

Reply Score: 3

RE: Reminds me...
by Drumhellar on Thu 19th Jul 2018 18:07 UTC in reply to "Reminds me..."
Drumhellar Member since:
2005-07-12

He should've waited until 6:60 to start talking about leap seconds.

Reply Score: 3

If only they'd fix Leap Year.
by JPowers on Thu 19th Jul 2018 16:32 UTC
JPowers
Member since:
2007-11-10

MS has a broken Leap Year issue going back to the MS-DOS days that they still haven't fixed.

Why add support for Leap Seconds which can be handled by the Network Time Protocol?

Reply Score: 0

RE: If only they'd fix Leap Year.
by Drumhellar on Thu 19th Jul 2018 18:16 UTC in reply to "If only they'd fix Leap Year."
Drumhellar Member since:
2005-07-12

MS has a broken Leap Year issue going back to the MS-DOS days that they still haven't fixed.


What issue is that?

Why add support for Leap Seconds which can be handled by the Network Time Protocol?


um... maybe because it is supported by NTP?

NTP isn't meant to be used as a clock, or for measuring time. If you wanted to set a specific event to happen at 17:24.25, you wouldn't use NTP to tell you when it was a quarter second after 17:24.

It's meant to be used for time synchronization of devices that have their own clocks. You would use NTP to tell you that, at this specific moment, it is 09:33.382, and use your own clocks to tell you when it is 17:24.25

Furthermore, imagine you have very basic time support in your OS. "Why add support for Leap Years which can be handled by the Network Time Protocol?" you might ask.

What do you do if your basic clock doesn't handle February 29, but NTP tells you that it is indeed that date?

Well, this is sort of the same thing.

Reply Score: 5