Using the date Command to Check/Update System Time

 

Do NOT change the time while a pass is being tracked!

 

You can use the date command to check and reset the system time.

1.

Display the system time in GMT:

% date -u

The GMT date and time for the moment at which you press the Return key will be displayed.

2.

Check the time against an external clock to determine its accuracy.

3. SUPERUSER  If the time is off by less than a few minutes, reset the system clock as follows:
a. Run the date command, using the -a option to adjust the system clock by a specified number of seconds.  For example:
date -a 5 (increment the system clock by 5 seconds)
date -a -135 (decrement the system clock by 2 minutes 15 seconds)
b. Recheck the clock:
# date
c. If necessary, continue adjusting the time in increments until the system time is correct.
4. SUPERUSER  If the time is off by more than a few minutes, reset the clock to a specific time. For example:
# date -u 1234.56
This will set the system time to:
12:34:56 GMT
For more information about the date command, type man date at the UNIX command prompt (%).


Last Update: $Date: 2001/05/17 18:59:23 $