-
Notifications
You must be signed in to change notification settings - Fork 4
ntp
Vurdalakov edited this page Nov 24, 2017
·
1 revision
ntp command-line tool is a simple NTP client that gets network time from an NTP server.
ntp [-utc] [-server:ntp.something.com] [-format:yyyy.MM.dd HH:mm:ss.fff]
-utc or -u shows UTC time instead of local time.
-server or -s uses server other than pool.ntp.org.
-format or -f uses custom time format instead of yyyy MM dd HH mm ss fff. You can use any of standard and custom time formats.
-silent shows no error messages; please check exit code.
ntp
2017 11 24 07 42 06 231
ntp -u
2017 11 24 05 42 06 231
ntp -f:HH:mm:ss.fff
07:42:06.231
ntp -u -f:s
2017-11-24T05:42:06
ntp -s:time.windows.com
2017 11 24 07 42 06 231