From: Juergen Perlinger Date: Mon, 26 Jan 2015 22:42:37 +0000 (+0100) Subject: [Bug 2732] - Leap second not handled correctly on Windows 8 X-Git-Tag: NTP_4_2_8P1_RC2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feda5bca871eaf382d00a1db10b4a136893ab88e;p=thirdparty%2Fntp.git [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 --- 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