HP-UX System Administrator's Guide: Configuration Management
Setting the System Clock
Only a superuser (root) can change the system clock. The system clock budgets process
time and tracks file access.
Potential Problems When Changing the System Clock
The following are potential problems you can cause by changing the system clock:
• The make program is sensitive to a file’s time and date information and to the
current value of the system clock. Setting the clock forward will have no effect,
but setting the clock backward by even a small amount may cause make to behave
unpredictably.
• Incremental backups depend heavily on a correct date because the backups rely
on a dated file. If the date is not correct, an incorrect version of a file can be backed
up.
• Altering the system clock can cause unexpected results for jobs scheduled by
/usr/sbin/cron:
— If you set the clock ahead, cron attempts to catch up by immediately starting
all jobs scheduled to run between the old time and the new. For example, if
you set the clock ahead from 9:00 to 10:00, cron immediately starts all jobs
scheduled to run between 9:00 and 10:00.
— If you set the time back, cron does not run any jobs until the clock catches up
to the point from which it was set back. For example, if you set the clock back
from 8:00 to 7:30, cron will not run any jobs until the clock again reaches 8:00.
— If you set the time back just after cron starts a job but before the job is recorded,
the job will be run twice. For example, if a job scheduled for 8:00 is started and
the time is set back to 7:30 before the job is recorded, the job will be recorded
as starting at about 7:30. When the clock again reaches 8:00, cron will start the
job a second time.
Setting the Time Zone (TZ)
To change the local time zone, you can use the /sbin/set_parms timezone
command. See “Setting System and Network Parameters” (page 41). This change
requires a system reboot.
Setting the time zone only affects how time is converted to local time for display.
Internally, the system records time in Universal Time (UTC).
Setting the Time and Date
If you have to reset the time or date, you can use the set_parms date_time command
or the date command. See “Setting System and Network Parameters” (page 41),
set_parms(1M), and date(1).
40 Configuring System Parameters