Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administrator's Guide: Configuration Management: HP-UX 11i Version 3 > Chapter 2 Configuring System Parameters

Setting the System Clock

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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 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 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.

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”. 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”, set_parms(1M), and date(1).

NOTE: HP strongly recommends that you use single-user mode when changing the system clock. Therefore, warn users of a planned system shutdown. See the HP-UX System Administrator’s Guide: Routine Tasks for details on system shutdown.

CAUTION: Changing the date while the system is running in multiuser mode may disrupt user-scheduled and time-sensitive programs and processes. Changing the date may cause make(1), cron(1M), and the Source Control subsystems SCCS (sccs(1)) and RCS (rcs(1)) to behave in unexpected ways. Additionally, any HP or third-party supplied programs that access the system time or the file time stamps stored in the file system, may behave in unexpected ways after the date is changed. Setting the date backward is not recommended. If changes were made to files in SCCS file format while the clock was not set correctly, check the modified files with the val command. See val(1) for details. See “Potential Problems When Changing the System Clock” for more information.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.