|
System Administration | setdate(1m) |
| setdate - set the date and time for
the system controller (SC) or a domain |
SYNOPSIS
| setdate [-d domain_id|domain_tag] [-u] [-q] [mmdd]HHMM|mmddHHMM[cc]yy[.SS] |
|
setdate(1M) allows the SC platform administrator to set the SC or optionally a domain date and time values. Allows domain administrators to set the date and time values for their domains. After setting the date and time, setdate(1M) displays the current date and time.
|
|
The following options are supported.
- -d domain_id
- ID for a domain. Valid domain_ids are 'A'...'R' and are case insensitive.
Sets the domain's 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.
- -d domain_tag
- Name assigned to a domain using addtag(1M).
Sets the domain's time of day (TOD) when the domain's 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 setting the new value.
- -u
- Interprets and displays the time using Greenwich Mean Time (GMT). The default is the local time zone.
|
|
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, and yy is the two digit year, SS is the second (0-59).
|
|
Group Privileges Required
|
You must have platform or domain administrator privileges to run this command. If you have domain administrator privileges you may only run this command for your domain.
Refer to Chapter 2 in the System Management Services (SMS) 1.2 Administrator Guide for the Sun Fire 15K/12K Systems for more information.
|
|
| 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
|
|
|
|
The following exit values are returned:
-
0
- Successful completion
- >0
- An error occurred.
|
|
See attributes(5) for descriptions of the following attributes:
Attribute Types | Attribute Values |
Availability | SUNWSMSop |
|
|
addtag(1m), setkeyswitch(1m), showdate(1m)
|
| |