VOGONS


NTP for older windows

Topic actions

First post, by Robbbert

User metadata
Rank Member
Rank
Member

As we know, NTP sync comes standard with XP and later, but I wanted to find out if it was possible for earlier Windows too.

Firstly, Windows 2000. The registry entries looked similar in layout to those in Windows 10, so I copied some registry keys over to W2K. After a reboot, the time magically sync'd. That was easy. There's a hard-coded limit of 12 hours offset though, so the machine time always needs to be near the correct time. Strangely, doing a NET TIME command has no such restriction.

Next, Windows 95, 98, 98SE, and NT 4.0. The registry is completely different (no w32time service), so I looked around for a free utility. The first one called atomic didn't work at all, wouldn't even start up, so I found another one called NetTime. This does the job just fine. The only downside is after installation on Windows 95, when you go to shut down the machine it hangs, you have to press the power button to turn it off. After that, it works without issue.

NTP sync did highlight a daylight saving issue though. In my part of the world the daylight savings date range was increased in 2008, this was fixed in XP, but not in earlier systems. So I had to additionally use TZEDIT to adjust W2K and NT4. I'm not aware of a tool for win9x so I updated the registry manually.

I haven't looked into NTP in DOS or Windows 3.x, and so far I'm not sure if it's worth worrying about.

One last thing to look at is that XP and later have a limit like W2K does, but Microsoft kindly documented a way to get around the "security", as they call it.

Reply 1 of 7, by giantclam

User metadata
Rank Member
Rank
Member

Tardis V3.0 Release Notes
26 November 1995

Tardis is a Windows 3.1x program that synchronises your PC's clock to a server's. It is
used where your PC is connected to a remote machine by TCP/IP, SLIP, or PPP. A
typical use would be to synchronise the clock on starting a SLIP/PPP connection to an
Internet provider (like demon). Another would be to have it running all the time in a
LAN environment correcting the clock once an hour.

https://archive.org/details/TARDISV3_ZIP

Reply 2 of 7, by konc

User metadata
Rank l33t
Rank
l33t
Robbbert wrote on 2023-10-10, 04:02:

I haven't looked into NTP in DOS or Windows 3.x, and so far I'm not sure if it's worth worrying about.

It's not automated like a windows service of course, but the mTCP suite now includes SNTP
https://www.brutman.com/mTCP/mTCP_Sntp.html

Last edited by konc on 2023-10-11, 07:10. Edited 1 time in total.

Reply 3 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Robbbert wrote on 2023-10-10, 04:02:

I haven't looked into NTP in DOS or Windows 3.x, and so far I'm not sure if it's worth worrying about.

I think the same. These systems were above the situation and rather low-latency by nature.

Back in those days users with the need for accurate time had used a radio clock, often connected to V.24 port.
Was more accurate than an NTP.
Had one, too. For receiving DCF-77 time station.

Nowadays, professionals receive time information via GPRS or other satellite navigational systems.
Again, much better than NTP.

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

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 7, by mbbrutman

User metadata
Rank Member
Rank
Member
Robbbert wrote on 2023-10-10, 04:02:

I haven't looked into NTP in DOS or Windows 3.x, and so far I'm not sure if it's worth worrying about.

mTCP includes an SNTP client for DOS. The 'S' in SNTP means "simple", and it just means that there is just one set of packets exchanged to set the time instead of multiple packets. Multiple exchanges are used to get better time synchronization, while "simple" is designed for clients that don't need absolute accuracy.

Assuming you are on Ethernet with SNTP you can get to within a few dozen milliseconds of the true time reported by the NTP server. Given that the DOS clock only gives you 55ms of timing resolution, this is more than adequate. If you really want the best in timing resolution buy a Garmin 18X LVC and look at this project: http://www.brutman.com/DOS_Time_Server/DOS_Time_Server.html . (Yes, I used a PCjr as a stratum 1 time server and it worked very well.)

SNTP is 43K in size; a lot of people run it when they first boot the system. It's as simple as this:

  • Load the packet driver and init mTCP
  • Run "sntp -set pool.ntp.org"

I have found that depending on the workload clock on DOS systems can drift quite a bit. These are old machines now meant to be used a few hours at a time, so none of them had super-accurate clocks to begin with. Setting the time once at boot-up is more than enough to correct for the drift for machines that get normal use, but for my web server I need to check and resync the time every few hours. (Under heavy load it will drop interrupts, causing the time to fall behind.)

Reply 5 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++

When we at home used the DCF-77 receiver back in the 90s, it came with drivers for DOS and Windows 3.1x.

I assume they had used interrupts at some point, to keep DOS/RTC up-to-date, because the Windows 3.1x driver made Windows 95 stutter.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 6 of 7, by ssokolow

User metadata
Rank Member
Rank
Member
Robbbert wrote on 2023-10-10, 04:02:

NTP sync did highlight a daylight saving issue though. In my part of the world the daylight savings date range was increased in 2008, this was fixed in XP, but not in earlier systems. So I had to additionally use TZEDIT to adjust W2K and NT4. I'm not aware of a tool for win9x so I updated the registry manually.

According to this WinWorld forum post, there are matching versions of TZEDIT on the Win9x CDs and I can confirm that.

The Windows 95 OSR2 CD that came with my childhood HP Pavilion 8160 contains \admin\apptools\tzedit\tzedit.exe.

My Windows 98 and 98 SE CDs contain \tools\reskit\config\tzedit.exe.

...now to just figure out where Mac OS 9.2.2 stores DST definitions and how to edit them. I suspect they're in the cty# and/or loc# resources inside the Date & Time control panel, but I don't have a ResEdit extension to show them as anything but a hex dump with place names threaded through the ASCII column.

Internet Archive: My Uploads
My Blog: Retrocomputing Resources
My Rose-Coloured-Glasses Builds

I also try to announce retro-relevant stuff on on Mastodon.

Reply 7 of 7, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

Having a vague memory about something we used with WFWG 3.11 back in mid 90s, it only worked with MS TCP/IP though and we couldn't get it going with Trumpet WinSOCK, so it only really became useful for a home connection on a modem when I.E. 3.0 or was it 2.x something came with a much improved dialler, then it would realise it had a network connection and connect to an nntp server.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.