home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

set date

Sets the system date and time directly or specifies a Network Time Protocol (NTP) server from which to acquire them.

set date { datetime | ntp ntpserver }
datetime
The date and time in one of the following formats:
  • MMDDhhmm
  • MMDDhhmmYY
  • MMDDhhmmCCYY
  • MMDDhhmmCCYY.ss

Note that the hour field (hh) uses the 24-hour clock (for example, 3:00 PM is represented as 15 in the hour field).

ntpserver
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.

Operational mode

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 69.59.150.135 IP address.

vyatta@R1:~$ set date ntp 69.59.150.135
15 May 23:00:00 ntpdate[7038]: step time server 69.59.150.135 offset 425.819267 secvyatta@R1:~$