IBM Support

AIX Time Zone: Using the POSIX time zone format

Question & Answer


Question

Some countries experience multiple time zone changes, resulting in urgent demands for interim fixes. Is there an alternative solution that allows immediate time zone updates instead of waiting for fixes?

Answer

AIX obtains its Time Zone Database (often called tz or zoneinfo) from the Internet Assigned Numbers Authority (IANA)
Time zone and daylight-saving rules are controlled by individual governments. Notification periods vary by country. Once IBM is notified of changes, steps are taken to update the Time Zone Database on supported versions of AIX. These updates can be provided by APARs, and are often delivered by interim fixes (ifixes) when the changes occur before the next official service pack is available.
This document describes the POSIX format. Some administrators prefer to use POSIX zones to avoid waiting for interim fixes. Some security standards require specific formats, for example, the US DISA (STIG) requires "GMT" as the time zone. Administrators should carefully consider their requirements and select the best option for their environment.
The advantage of POSIX:
You can specify the time zone and Daylight Saving Time (DST) details manually.
The performance of applications that call time functions is faster than using Olson specifications.
Disadvantages of POSIX: 
The Olson database maintains a historical record of the time zone rules at given points in time. If the rules change in a particular location, dates and times can be interpreted correctly both in the present and past. A good example of this requirement is the US state of Indiana, which began using Daylight Saving Time in the year 2006. Under the POSIX implementation, Indiana would have to set its time zone value to EST5EDT, which would format current dates correctly using Daylight Saving Time. However, the times from previous years would be incorrectly formatted as though they were on Daylight Saving Time.
In the following example, Egypt has adopted new rules for DST.
2023 Rules:
DST ON Friday April 28 00:00
DST OFF Friday October 28 00:00
The command to add the POSIX string:
chtz EET-2EEST,M4.5.5/0,M10.5.4/24
The chtz command added the following to /etc/environment:
TZ=EET-2EEST,M4.5.5/0,M10.5.4/24
Or, you can use the SMIT interface to chtz:
# smitty chtz_user
                       Change Time Zone
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                     [Entry Fields]
* Standard Time ID(only alphabets)                   [EET]
* Standard Time Offset from CUT([+|-]HH:MM:SS)       [-2]
  Day Light Savings Time ID(only alphabets)          [EEST]
  Day Light Savings Time Offset from CUT([+|-]HH:MM: []
  SS)
  Start Daylight Savings Day([Mmm.ww.dd|Jn])         [M4.4.5]
  Start Daylight Savings Time(HH:MM:SS)              [0]
  Stop Daylight Savings Day([Mmm.ww.dd|Jn])          [M10.4.5]
  Stop Daylight Savings Time(HH:MM:SS)               [0]
Details:
The POSIX string for this change:

Syntax: std[offset][dst[offset][,start[/time],end[/time]]]

TZ=EET-2EEST,M4.5.5/0,M10.5.4/24

Field descriptions:

 EET:	The abbreviation used when DST is off (std)
  -2:	Hour offset from UTC
EEST:	The abbreviation used when DST is on (dst)
 .M4:	The fourth month (April) (start)
  .:	The fourth occurrence of the day in the month
  .5:	Friday  (Days 0-6)
  /0:	The time DST starts
,M10:	The tenth month (October)
   4:	The fourth occurrence of the day in the month
  .5:	Friday  (Days 0-6)
  /0:	The time DST ends
TIP: You can extract the string from Olson tzdata.
# tail -1 /usr/share/lib/zoneinfo/Egypt
EET-2EEST,M4.5.5/0,M10.5.4/24
EET-2EEST,M4.4.5/0,M10.4.5/0
 
After the TZ change:
A reboot is not mandatory. However, a reboot is recommended so processes started before the change are in sync. 
When the TZ environment variable is changed, either with the chtz command through SMIT, the cron daemon must be restarted. This enables the cron daemon to use the correct time zone and summer time change information for the new TZ environment variable.
  • See IBM Documentation about the cron daemon: 
    • https://www.ibm.com/docs/en/aix/7.3?topic=c-cron-daemon
Sometimes, only database applications require a restart to pick up time changes. If you cannot reboot immediately, check with your application teams to determine which applications should be restarted.
 
Testing Tip:
SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1.  Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2.  Capture any logs or data relevant to the situation.

3.  Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4.  Provide a clear, concise description of the issue.

5.  If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - See Working with IBM AIX Support: Collecting snap data

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m50000000L0QaAAK","label":"Commands-\u003ETime Zone"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
24 May 2023

UID

ibm16967869