mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
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.)
This commit is contained in:
parent
8016b2c546
commit
0736ae4116
Notes:
sideshowbarker
2024-07-19 02:52:05 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/0736ae41168 Pull-request: https://github.com/SerenityOS/serenity/pull/3410 Reviewed-by: https://github.com/asynts Reviewed-by: https://github.com/awesomekling
1 changed files with 3 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue