12/06/95, 4FAX# 1296 Managing the Time Zone Variable SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. ABOUT THIS DOCUMENT This document discusses the Time Zone (TZ) variable and changing to and from Daylight Savings Time (DST). This doc- ument applies to both AIX 3.2 and AIX 4.1. ABOUT DST If the Daylight Savings Time option is enabled, the default in AIX is for the system time to move forward 1 hour (to DST) at 2:00am the first Sunday in April, and move back one hour (to Standard Time) at 2:00 a.m. on the last Sunday in October. The default is hard coded and is not stored in any user accessible file. However, the date and time at which the switch to DST and ST occurs can be altered by the root user. To see if DST is enabled, echo $TZ; if the time zone variable ends in "DT", DST is enabled. TURNING DST ON If you wish to enable Daylight Savings Time, you can do so with the following SMIT menus: System Environments Change / Show Date, Time, and Time Zone Answer "1 yes" to "Use Daylight Savings Time?" TURNING DST OFF If Daylight Savings Time does not apply to your location, you can turn this option off with the following SMIT menus: System Environments Change / Show Date, Time, and Time Zone Answer "2 no" to "Use Daylight Savings Time?" Managing the Time Zone Variable 1 12/06/95, 4FAX# 1296 CHANGING THE EFFECTIVE DATE TO SWITCH TO DST If you wish to change the date or time at which the system switches to DST and back to ST, edit the TZ line in your /etc/environment like the following: TZ=CST6CDT,M4.1.0/1:00:00,M10.1.0/1:00:00 This would change to Daylight Savings Time at 1:00 AM on the first Sunday in April and change back at 1:00 AM on the first Sunday in October, and keep the US Central Time Zone time offset from GMT. The breakdown of the string is o CST6CDT is the time zone you are in; o M4 is the fourth month; o .1 is the first occurrence of a day in the month; o .0 is Sunday; o /1:00:00 is the time. So the format for this is TZ = local_timezone,date/time,date/time. Here date is in the form of Mm.n.d, the d'th day (0-6) of week n (1-5, where week 5 means "the last d day in month m" and which may occur in either the fourth or the fifth week) of month m of the year. Week 1 is the first week in which the d'th day occurs. Day zero is Sunday. This format is compliant with POSIX 1003.1 standards for Extensions to Time Functions. HOW SWITCHING TO DST AFFECTS CRON JOBS If you have a cron job that is to be run at 2:01am and it is the time of year when the time springs forward, this job will not be run. The time skips from 2:00am to 3:00am. If it is the other part of the year and the time is being set back one hour, jobs that run between 1:00am and 2:00am will be run twice. So, for jobs set between 2:00am and 3:00am, in the spring you will need to either change the time for these jobs to run, run them manually, or wait until the following day to run them. The cron daemon does not need to be stopped; however, if you make any changes to your TZ variable, then you should kill the current cron daemon so that it will automatically respawn and recognize the new TZ setting. NOTE: Daylight savings time is just a way in which time is displayed to the user. Time is still kept the same inter- nally, so programs such as dce which use time as it is stored internally will not be affected by daylight savings time. Managing the Time Zone Variable 2 12/06/95, 4FAX# 1296 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (time.zone.cmd, 4FAX# 1296) Managing the Time Zone Variable 3