From feda5bca871eaf382d00a1db10b4a136893ab88e Mon Sep 17 00:00:00 2001 From: Juergen Perlinger Date: Mon, 26 Jan 2015 23:42:37 +0100 Subject: [PATCH] [Bug 2732] - Leap second not handled correctly on Windows 8 use 'GetTickCount()' to get the true elapsed time of slew (This should work for all versions of Windows >= W2K) bk: 54c6c2ddC82s-XbFpGRoEgyY4h7Jmg --- ChangeLog | 4 ++++ ports/winnt/ntpd/nt_clockstuff.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f7b394557..59fc4b079 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ --- +* [Bug 2732] - Leap second not handled correctly on Windows 8 + use 'GetTickCount()' to get the true elapsed time of slew + (This should work for all versions of Windows >= W2K) +--- (4.2.8p1-beta5) 2015/01/07 Released by Harlan Stenn * [Bug 2728] Work around C99-style structure initialization code diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c index a69c26896..e15624cf5 100644 --- a/ports/winnt/ntpd/nt_clockstuff.c +++ b/ports/winnt/ntpd/nt_clockstuff.c @@ -556,7 +556,7 @@ adj_systime( /* slew starts with last second before insertion! * And we have to tell the core that we deal with it. */ - ls_ft.ull -= HECTONANOSECONDS; + ls_ft.ull -= (HECTONANOSECONDS + HECTONANOSECONDS/2); leapsec_electric(TRUE); } else if (lsi.tai_diff < 0) { /* Do not handle negative leap seconds here. If this -- 2.47.3