Skip to main content

clock command

Use this command to display the current date and time. You can set the UTC offset and daylight saving time settings

The BMC obtains the time from the host server or NTP server.

The time obtained from the host may be local time or UTC time. The host option should be set to UTC if NTP is not used and the host uses UTC format. UTC offset can be in the format of +0200, +2:00, +2, or 2, for positive offsets, and -0500, -5:00 or -5, for negative offsets. UTC offset and daylight savings times are used with NTP or when the host mode is UTC.

For a UTC offset of +2, -7, -6, -5, -4 and -3 special daylight saving time settings are required.
  • For +2, the daylight saving time options are as follows: off, ee (Eastern Europe), tky (Turkey), bei (Beirut), amm (Amman), jem (Jerusalem).
  • For -7, the daylight saving time settings are as follows: off, mtn (Mountain), maz (Mazatlan).
  • For -6, the daylight saving time settings are as follows: off, mex (Mexico), cna (Central North America).
  • For -5, the daylight saving time settings are as follows: off, cub (Cuba), ena (Eastern North America).
  • For -4, the daylight saving time settings are as follows: off, asu (Asuncion), cui (Cuiaba), san (Santiago), cat (Canada - Atlantic).
  • For -3, the daylight saving time settings are as follows: off, gtb (Godthab), bre (Brazil - East).
Syntax:
clock [<em className="ph i">options</em>]
options:
-u <em className="ph i">UTC offset</em>
-dst <em className="ph i">on/off/special case</em>
-host - local | utc , format of time obtained from host (default: utc)
Windows systems use local, Linux uses utc
Example:
system> clock
12/12/2011 13:15:23 GMT-5:00 dst on