Network Appliance(TM)

Manual Pages


Table of Contents

NAME

date - display or set date and time

SYNOPSIS

date [ -u ] [ [[[[cc]yy]mm]dd]hhmm[.ss] ]

DESCRIPTION

date displays the current date and time when invoked without arguments.

When invoked with an argument, date sets the current date and time; the argument for setting the date and time is interpreted as follows:

cc
First 2 digits of the year (e.g., 19 for 1999).

yy
Next 2 digits of year (e.g., 99 for 1999).

mm
Numeric month. A number from 01 to 12.

dd
Day, a number from 01 to 31.

hh
Hour, a number from 00 to 23.

mm
Minutes, a number from 00 to 59.

ss
Seconds, a number from 00 to 59.

If the first 2 digits of the year are omitted, they default to 19 if the last two digits of the year are 69 or greater and to 20 if the last two digits of the year are 38 or less (provided the month and year are not later than 0118) and to Wed Dec 31 23:59:59 GMT 1969 otherwise; if all 4 digits of the year are omitted, they default to the current year. If the month or day are omitted, they default to the current month and day, respectively. If the seconds are omitted, they default to 0.

All dates that are not between Jan 1, 1970 and Jan. 18, 2038 are replaced by Wed Dec 31 23:59:59 GMT 1969.

Time changes for Daylight Saving and Standard time, and for leap seconds and years, are handled automatically.

OPTIONS

-u Display or set the date in GMT (universal time) instead of local time.

CLUSTER CONSIDERATIONS

You cannot use the date command in partner mode to set the date on the failed filer.

EXAMPLES

To set the current time to 21:00:

  date 2100

To set the current time to 21:00, and the current day to the 6th of the current month:

  date 062100

To set the current time to 21:00, and the current day to December 6th of the current year:

  date 12062100

To set the current time to 21:00, and the current day to December 6th, 1999:

  date 9912062100

To set the current time to 21:00, and the current day to December 6th, 2002:

  date 200212062100

SEE ALSO

na_partner(1), na_rdate(1), na_timezone(1)


Table of Contents