time

Syntax

time[hh:mm[:ss]][-tz tz][-d dl]

Description

Displays or sets the current time for the system.

Options

hh

Sets a new hour value (0–23).

mm

Sets a new minute value (0–59).

ss

Sets a new second value (0–59). If not specified, zero is used.

-tztz

Sets a time zone adjustment, in minutes, offset from GMT. Valid values range from -1440 and 1440 or be set at 2047. If the value is not present or set to 2047, time is interpreted as local time.

-d dl
Sets a daylight savings time value. Valid values are:
  • 0—Time is not affected by daylight savings time.
  • 1—Time is affected by daylight savings time but has not been adjusted.
  • 3—Time is affected by daylight savings time and has been adjusted.
If no value follows –d, the current daylight savings time is displayed.

Usage

If no parameters are specified, this command shows the current time. If valid hours, minutes, and seconds are provided, the system's time is updated.

Except for numeric characters and the : (colon) character, all other characters in the argument are invalid. The Shell reports an error if the number is in the wrong hour/minute/second range. Spaces before or after the numeric character are not allowed. Spaces inserted into the number are not allowed either.

If the seconds parameter is not specified, seconds are set to zero by default.

Examples

To display the current system time:

fs0:\> time 
16:51:03 (GMT+08:00)
      

To set the current system time:

fs0:\> time 9:51:30 
fs0:\> time 
09:51:31 (GMT+08:00)
      

To set the system time, and display the daylight savings time setting:

fs0:\> time 9:51:30 
fs0:\> time —d
09:51:31 (GMT+08:00) DST: Not Affected