IBM Support

AIX Time Zone: Olson tzdata updates

Question & Answer


Question

How are time zone updates delivered in AIX?

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.
ImportantNotice1
Important notice regarding the availability of TZ updates:
IANA hosts the Time Zone Database project, and is responsible for distributing the data. However, the curation of the time zone data is performed by a community of volunteers, convened through an IANA discussion forum. Required updates are made to the database, and a new release is delivered by the group.
Reference:
Like many software vendors, AIX must retrieve the data, build the new time zones, and integrate the changes in to the next AIX release. The IANA recommends that policymakers provide at least a year advance notice of time zone policy changes, to allow time for IANA and vendor testing, integration, and release.
Sometimes, policymakers change time zone rules with a very short notification period. IBM AIX development strives to expedite the IANA release updates, and provide interim fixes. While ifixes are not generally exposed to full regression or system testing, they are still tested for functionality and some regression, and might not be available before the affected date. If expedited updates are required, users are advised to implement documented workarounds.
Beginning March, 2023, the following table was created to list the latest time zone information, including interim fix information (if applicable), and the Time Zone Database version. 
The change summaries are not all inclusive. For full detail, refer to the IANA Announcement link in the table. More IANA references are listed in the "Related Information" section at the end of this document.
 
Affected Time Zones
Download Directory ifix and workaround README Time Zone Database Version and News
Africa/El_Aaiun
Africa/Cairo
Africa/Casablanca
America/Godthab
America/Nuuk
America/Yellowknife
Asia/Gaza
Asia/Hebron
Egypt
Europe/Kirov
Europe/Volgograd
ifix Directory README 2023c
Combined fixes, from 2022a - 2022g

asia    Asia/Amman:2022e 2022f
asia    Asia/Damascus:2022e 2022f
asia    Asia/Gaza:2022a 2022d
asia    Asia/Tehran:2022c

australasia  Pacific/Fiji:2022f

europe  America/Nuuk:2022g
europe  Europe/Kiev:2022a
europe  Europe/Simferopol:2022c

northamerica    America/Bahia_Banderas:2022e 2022f
northamerica    America/Chihuahua:2022e 2022f
northamerica    America/Ciudad_Juarez:2022g
northamerica    America/Hermosillo:2022e
northamerica    America/Matamoros:2022e
northamerica    America/Mazatlan:2022e 2022f
northamerica    America/Merida:2022f
northamerica    America/Mexico_City:2022e 2022f
northamerica    America/Monterrey:2022f
northamerica    America/Nipigon:2022f
northamerica    America/Ojinaga:2022e 2022f
northamerica    America/Rainy_River:2022f
northamerica    America/Thunder_Bay:2022f
northamerica    America/Tijuana:2022e

southamerica    America/Santiago:2022a 2022c
ifix Directory README 2022g
NOTE: If you require a time zone update before a fix is available from AIX, there are two workarounds.
A) Use the POSIX time zone format
Read more details and command examples
B) Compile the updated IANA tzdata source and replace the current time zone data file.
Note:  In 2016, changes in time zone data files introduced changes for zic and zdump. The following steps apply to the following, and later, AIX versions:
7200-01-00-1642
7100-04-03-1642
** If you have older versions of AIX, you need to download an older IANA tzdata file, then make manual updates to the source to reflect the changes for your time zone.  This customization is out of scope for AIX Support.
The following example shows how to change the 2022e time zone to reflect the year-round +03 time zone for Jordan.
1) Download the latest tzdata from IANA at https://www.iana.org/time-zones
In this example, we used 2022e to pick up the Oct 28 2022 Amman, Jordan DST time change.
Since the only file required for this change is the asia content, we only download the single file:
  • https://data.iana.org/time-zones/tzdb-2022e/asia
2) Prepare the directory
# mkdir -p /tmp/tztmp
# cd /tmp/tztmp
3) Examine the existing TZ information
# zdump -v Asia/Amman | egrep "2022" | tee before.zdump
Asia/Amman  Thu Feb 24 21:59:59 2022 UT = Thu Feb 24 23:59:59 2022 EET isdst=0 gmtoff=7200
Asia/Amman  Thu Feb 24 22:00:00 2022 UT = Fri Feb 25 01:00:00 2022 EEST isdst=1 gmtoff=10800
Asia/Amman  Thu Oct 27 21:59:59 2022 UT = Fri Oct 28 00:59:59 2022 EEST isdst=1 gmtoff=10800
Asia/Amman  Thu Oct 27 22:00:00 2022 UT = Fri Oct 28 00:00:00 2022
EET isdst=0 gmtoff=7200
4) Copy the downloaded file to the current directory, or use the AIX Toolbox for Open Source wget or curl command:
# wget http://data.iana.org/time-zones/tzdb-2022e/asia
# curl http://data.iana.org/time-zones/tzdb-2022e/asia -so asia
5) Compile the data
# zic -d compiled asia
NOTE: Warning messages about POSIX standards are printed.
For example,
warning: "asia", line 86: %s (%s)time zone abbreviation differs from POSIX standard (+04)
Ignore these messages. The time zone information is correct. The warning is based on POSIX.1-1988. However, the restriction was removed in POSIX.1-2001. Therefore, the warning can be ignored.

6) Replace the current data
# mv  /usr/share/lib/zoneinfo/Asia/Amman  /usr/share/lib/zoneinfo/Asia/Amman.old
# cp compiled/Asia/Amman /usr/share/lib/zoneinfo/Asia/Amman
# chmod 644 /usr/share/lib/zoneinfo/Asia/Amman
# chown bin.bin /usr/share/lib/zoneinfo/Asia/Amman

7) Check the new data
#  zdump -v Asia/Amman | egrep "2022" | tee after.zdump
Asia/Amman  Thu Feb 24 21:59:59 2022 UT = Thu Feb 24 23:59:59 2022 EET isdst=0 gmtoff=7200
Asia/Amman  Thu Feb 24 22:00:00 2022 UT = Fri Feb 25 01:00:00 2022 EEST isdst=1 gmtoff=10800
Asia/Amman  Thu Oct 27 21:59:59 2022 UT = Fri Oct 28 00:59:59 2022 EEST isdst=1 gmtoff=10800
Asia/Amman  Thu Oct 27 22:00:00 2022 UT = Fri Oct 28 01:00:00 2022
+03 isdst=0 gmtoff=10800
8) Check the current date
# TZ=Asia/Amman
# date
Wed Oct 19 15:36:39 EEST 2022

# zdump  Asia/Amman
Asia/Amman  Wed Oct 19 15:36:51 2022 EEST
9) Change the date to Oct 28
# date 1028144222
Fri Oct 28 14:42:06 +03 2022
# zdump  Asia/Amman
Asia/Amman  Fri Oct 28 14:42:08 2022 +03
10) Confirm the difference
# diff before.zdump after.zdump
< Asia/Amman  Thu Oct 27 22:00:00 2022 UT = Fri Oct 28 00:00:00 2022 EET isdst=0 gmtoff=7200
---
> Asia/Amman  Thu Oct 27 22:00:00 2022 UT = Fri Oct 28 01:00:00 2022
+03 isdst=0 gmtoff=10800
>
You can use the commands as a script.
The following script builds the changes for Mexico DST, included in IANA 2022g.
If you want to do live testing, you can export DATETEST=y to change the system date to the start of DST. 
You are reminded to reset the date at the end of the test.
#!/bin/sh
if [[ -n "$DATETEST" ]]; then
echo "IMPORTANT!!! DATETEST is set, so this test will change your system date! "
echo "You must run the 'date' command at the end of this test to reset the date."
printf "Do you want to proceed with this test? (y/n): "
read  answer
case $answer in
        yes|Yes|y|"")
                echo "Proceeding...Remember to reset system date when test is complete!"
                ;;
        no|n)
                echo "Exiting... You can unset DATETEST and run the script without changing the date"
                exit 0 ;;
esac
fi
set -A TZONE \
"America/Bahia_Banderas" \
"America/Chihuahua" \
"America/Ciudad_Juarez" \
"America/Hermosillo" \
"America/Matamoros" \
"America/Mazatlan" \
"America/Merida" \
"America/Mexico_City" \
"America/Monterrey" \
"America/Ojinaga" \
"America/Tijuana"
dstring="$(date +"%m%d%y%H%S")"
dateTest()
{
TZ="$i"
echo
echo $TZ
echo "BEFORE DST CHANGE"
date 0311020123
zdump  $TZ | tee -a beforeDSTdate.zdump
echo
echo "AFTER DST CHANGE"
date 0312020123
zdump  $TZ | tee -a afterDSTdate.zdump
echo
}
echo "Making a backup of the zoneinfo --> /usr/share/lib/zoneinfo.backup.$dstring"
cp -R /usr/share/lib/zoneinfo /usr/share/lib/zoneinfo.backup.$dstring
mkdir -p /tmp/tztmp.$dstring

 
cd /tmp/tztmp.$dstring
# USE ONLY ONE "#" COMMENT OUT WGET OR CURL!!!)
# wget http://data.iana.org/time-zones/tzdb-2022g/northamerica
#OR
curl http://data.iana.org/time-zones/tzdb-2022g/northamerica -so northamerica
   if [ ! -e "northamerica" ] ; then
     echo "Unable to download tzdb.  Check command and connection and try again"
     exit 1
else

 
zic -d compiled northamerica
 
for i in "${TZONE[@]}"
  do
   zdump -v $i | egrep "2023" >> before2023.zdump
     if [ -e "/usr/share/lib/zoneinfo/$i" ] ; then
      mv  /usr/share/lib/zoneinfo/$i  /usr/share/lib/zoneinfo/$i.old
   else
     echo "$i does not exist in original zoneinfo directory!"
     fi
  if [ -e "compiled/$i" ] ; then
    cp compiled/$i  /usr/share/lib/zoneinfo/$i
     else echo "compiled/$i does not exist!"
  fi
  chmod 644 /usr/share/lib/zoneinfo/$i
  chown bin.bin /usr/share/lib/zoneinfo/$i
  zdump -v $i | egrep "2023" >> after2023.zdump
    if [[ -n "$DATETEST" ]]; then
      dateTest
    fi
done
fi # End zic
echo
echo "Compiled data and output in /tmp/tztmp.$dstring"

 
if [[ -n "$DATETEST" ]]; then
echo "##########################################################"
echo "Checking difference before DST and after DST date change"
echo "##########################################################"
diff beforeDSTdate.zdump afterDSTdate.zdump | sort +1
echo
echo "REMEMBER TO RESET SYSTEM TIME!!! (date mmddHHMMyy)"
fi

 
After the TZ change:
A reboot is not mandatory. However, a reboot is recommended so processes started before the change are in sync. 
  • https://www.ibm.com/docs/en/aix/7.3?topic=c-cron-daemon
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.
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

ibm16554212