Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
System Administrationsetdate(1m)


NAME

 setdate - set the date and time for the system controller (SC) or a domain

SYNOPSIS

 setdate [-d domain_indicator ] [-u] [-q] [mmdd]HHMM|mmddHHMM[cc]yy[.SS]
 setdate -h

DESCRIPTION

 

setdate(1M) enables the SC platform administrator to set the SC or optionally set a domain date and time values. Enables domain administrators to set the date and time values for their domains. After the date and time are set setdate(1M) displays the current date and time.

OPTIONS

 

The following options are supported:

-d domain_indicator
Specifies the domain using one of the following:

domain_id -ID for a domain. Valid domain_ids are A-R and are not case sensitive.

domain_tag - Name assigned to a domain using addtag(1M).

Sets the domain time of day (TOD) when the domain keyswitch is in the OFF or STANDBY position. This option is not the primary use of setdate. Normally, setdate is used without this option to set the SC TOD.

-h
Help. Displays usage descriptions. Note – Use alone. Any option specified in addition to -h is ignored.
-q
Does not display current date and time after you set the new value.
-u
Interprets and displays the time using Greenwich Mean Time (GMT). The default is the local time zone.

OPERANDS

 

The following operands are supported:

[mmdd]HHMM[.SS]
Date and time format. mm is the month (1-12), dd is the day of the month (1-31), HH is the hour (0-23), MM is the minute (0-59), and SS is the second (0-59).
mmddHHMM[cc]yy[.SS]
Date and time format. mm is the month (1-12), dd is the day of the month (1-31), HH is the hour (0-23), MM is the minute (0-59), cc is century minus one, yy is the two-digit year, and SS is the second (0-59).

EXTENDED DESCRIPTION

 

Group Privileges Required

 

You must have platform or domain administrator privileges to run this command. If you have domain administrator privileges you can run this command only for your domain.

Refer to Chapter 2, "SMS Security Options and Administrative Privileges" in the System Management Services (SMS) 1.4 Administrator Guide for more information.

EXAMPLES

 Example 1. Setting the Local Date in Pacific Standard Time
 
 
sc0:sms-user:> setdate 020210302002.00
System Controller: Sat Feb 2 10:30:00 PST 2002
Example 2. Setting the Date Using GMT
 
 
sc0:sms-user:> setdate -u 020218302002.00 
System Controller: Sat Feb 2 18:30:00 GMT 2002 
Example 3. Setting the Local Time in Pacific Standard Time for Domain A
 
 
sc0:sms-user:> setdate -d a 020210302002.00 
Domain a: Sat Feb 2 10:30:00 PST 2002
Example 4. Setting the Date for Domain A Using GMT
 
 
sc0:sms-user:> setdate -d a -u 020218302002.00 
Domain a: Sat Feb 2 18:30:00 GMT 2002

EXIT STATUS

 

The following exit values are returned:

0
Successful completion.
>0
An error occurred.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes.

Attribute TypesAttribute Values
AvailabilitySUNWSMSop

SEE ALSO

 

addtag(1m), setkeyswitch(1m), showdate(1m)


SMS 1.4Go To TopLast Changed 19 September 2003