[PATCH] libc/time: Add CLOCK_TAI

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jul 18 12:08:08 GMT 2025


On Jul 17 11:19, Corinna Vinschen wrote:
> In the end, maybe Windows actually comes to the rescue.  Leap seconds
> support has been added in 2018 to Windows 10(*).  There's a new registry
> key HKLM\SYSTEM\CurrentControlSet\Control\LeapSecondInformation with a
> value "LeapSeconds".  So, how is that supposed to work?(**)
> 
> Apparently the OS has the leap secs timestamps hardcoded builtin (so
> we're @ 37 secs by default).  The "LeapSeconds" entry is empty.
> However, you can add timestamps to this value:
> 
>   w32tm /leapseconds /add:+2021-11-30T23:59:59 /force
> 
> This timestamp gets added to the "LeapSeconds" registry value.  Rinse and
> repeat.
> 
> So I think the DLL should actually read and evaluate that registry key
> in the first place.  37 secs, plus the entries in "LeapSeconds".
> 
> But, what about pre-2018 OSes, like Windows 8.1 and Windows 10 <= 1709?
> For those, we can think of maintaining that very simple /etc/leapsecs
> file and be done with it.

https://sourceware.org/cgit/newlib-cygwin/commit/?id=a0634931f181


Corinna


More information about the Cygwin-developers mailing list