PR adjustments.

Removed google, AWS, Apple, Microsoft, and AWS from the default NTP servers (leaving us with pool.ntp.org and time.cloudflare.com).
Added http://pool.ntp.org and http://microsoft.com to the HTTP fall-back servers (after testing they will send a Date response header.
This commit is contained in:
Marc Brooks 2025-03-17 17:56:56 -05:00
parent 64421caa7f
commit 9ee6c39178
1 changed files with 2 additions and 5 deletions

7
ntp.go
View File

@ -24,10 +24,6 @@ var (
defaultNTPServers = []string{
"pool.ntp.org",
"time.cloudflare.com",
"time.google.com",
"time.aws.com",
"time.apple.com",
"time.windows.com",
}
)
@ -98,8 +94,9 @@ func queryNetworkTime() (*time.Time, error) {
}
}
httpUrls := []string{
"http://pool.ntp.org",
"http://apple.com",
"http://cloudflare.com",
"http://microsoft.com",
}
for _, url := range httpUrls {
now, err := queryHttpTime(url, timeSyncTimeout)