summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-09-06 09:35:34 -0400
committerAndreas Kling <kling@serenityos.org>2020-09-06 21:50:55 +0200
commit0736ae4116845a63429bb481e6b2f3dc97f3adcb (patch)
treec1cf1b55f1e028db9560ec23fb7acaad531f78bf
parent8016b2c54625b761f5713c1b3f964dd37ad7e490 (diff)
downloadserenity-0736ae4116845a63429bb481e6b2f3dc97f3adcb.zip
ntpquery: Use time.google.com as default NTP server for now
Using a pool.ntp.org server seems nicer and more open-source-y, but until our pool use is approved, let's put in a default value that works. (time.google.com serves smeared time instead of doing leap seconds. pool.ntp.org doesn't serve smeared time. I intend to implement client-side leap second smearing since nobody likes jumpy timestamps. For now, we get this for free.)
-rw-r--r--Userland/ntpquery.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Userland/ntpquery.cpp b/Userland/ntpquery.cpp
index 089d1daf8e..58a8ab2826 100644
--- a/Userland/ntpquery.cpp
+++ b/Userland/ntpquery.cpp
@@ -105,13 +105,10 @@ int main(int argc, char** argv)
return 1;
}
- // FIXME: Request serenityos.pool.ntp.org here https://manage.ntppool.org/manage/vendor
- // and then use that as the default value.
- // Until then, explicitly pass this as `ntpquery pool.ntp.org`.
- const char* host = nullptr;
-
+ // FIXME: Change to serenityos.pool.ntp.org once https://manage.ntppool.org/manage/vendor/zone?a=km5a8h&id=vz-14154g is approved.
+ const char* host = "time.google.com";
Core::ArgsParser args_parser;
- args_parser.add_positional_argument(host, "NTP server", "host", Core::ArgsParser::Required::Yes);
+ args_parser.add_positional_argument(host, "NTP server", "host", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
auto* hostent = gethostbyname(host);