Sets the system date and time directly or specifies a Network Time Protocol (NTP) server from which to acquire them.
- The date and time in one of the following formats:
Note that the hour field (hh) uses the 24-hour clock (for example, 3:00 PM is represented as 15 in the hour field).
- An NTP server from which to acquire the current date and time. You can specify either an IPv4 address or a host name to identify the NTP server.
Use this command to set the system date and time either directly or by specifying an NTP server from which to acquire them. If a time zone has not been configured, then Greenwich mean time (GMT) is assumed. The time zone is set by using system time-zone <zone>.
The following example shows how to set the system date and time to May 15, 2008 at 10:55 PM (assuming that the time zone is set to Pacific daylight time).
vyatta@R1:~$ set date 051522552008 Thu May 15 22:55:00 PDT 2008vyatta@R1:~$
The following example shows how to set the system date and time by using an NTP server at the 184.108.40.206 IP address.
vyatta@R1:~$ set date ntp 220.127.116.11 15 May 23:00:00 ntpdate: step time server 18.104.22.168 offset 425.819267 secvyatta@R1:~$