Managing Platform time-of-day (TOD)
Sun Confidential: Internal Only
55
SunService Sun Microsystems, Inc. All Rights Reserved. Enterprise Services
Managing Platform time-of-day (TOD)
Displaying the date and Time
To view the date, use the
showdate
command; for example:
6800b-sc0:SC> showdate
Tue Aug 10 15:30:29 BST 2004
6800b-sc0:SC>
The system controller uses the
setdate
command to set both the platform
and domain TOD. This command, when invoked from the platform shell,
has no effect on the date and time in each domain shell.
The syntax of the
setdate
command is:
setdate [-v] [-t <time zone>] mmddHHMM[[cc]yy][.SS]
Setting the Date and Time for the Shell
You can set the TOD from the platform shell by using the
setdate
command followed by the desired date; for example:
6800b-sc0:SC> setdate -t Europe/London 081015302004.00
Tue Aug 10 15:30:00 BST 2004
If you have the wrong timezone, choose the correct one from the
showdate -v -t
output:
6800b-sc0:SC> setdate -t Pacific/Tongatapu
Wed Aug 11 03:38:12 TOT 2004
Setting the Date and Time From a Network Time-Server
You can set the system controller TOD using
rdate
. The host must be a
valid system name, and the system must support
rdate
requests:
6800b-sc0:SC> setdate -r 172.16.40.5
Tue Aug 10 15:34:20 BST 2004
6800b-sc0:SC>