A Technical Architects Diary

Tag: date

date

by on Jul.07, 2009, under 7-mode Manual Pages

Table of Contents

NAME

date – display or set date and time

SYNOPSIS

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

date [ -u ] -c

date [ -f ] -c initialize

DESCRIPTION

date displays the current date and time of the system clock when invoked without arguments.

When invoked with an argument, date sets the current date and time of the system clock; 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, and the 2nd 2 digits are > 68, a date in the 1900s is used, otherwise a date in the 2000s will be assumed. 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.

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.

-c
Display or set the date and time for the compliance clock instead of the system clock. This option may be used only if one has installed a SnapLock Compliance or SnapLock Enterprise license.

Setting the compliance clock is indicated by -c initialize. This will initialize the compliance clock to the current value of the system clock. Care should taken that to ensure that the system clock is appropriately set before running -c initialize because the compliance clock may only be set once; there is no mechanism for resetting the compliance clock.

-f
Suppress the interactive confirmations that occur when using -c initialize.

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

partner , rdate , timezone


Table of Contents

Leave a Comment :, , , , more...

date & time

by on Mar.03, 2009, under CFE / Loader Commands

These are 2 different commands, but they are closely connected.

Use set date to set the date (set date mm/dd/yy)

Use set time to set the time (set time hh:mm:ss)

show date and show time are the same command really and both give the same output.

CFE> show date
Current date & time is: 03/03/2009  11:33:26
CFE> show time
Current date & time is: 03/03/2009  11:33:27

Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!