Introduction to Time Zone Update Tool
As we know, the IANA Time Zone Database holds the time zone differences and rules for various regions of the world. It allows this information to be mirrored and used by systems and other electronic devices to maintain proper configuration for timekeeping. The IANA standards body maintains the Olson time zone rules globally and updates them whenever any country announces changes in DST rules, etc.
AIX systems use this time zone database, which needs to be synchronized whenever a country announces changes in DST rules. Whenever there is a new update or rule from IANA, IBM’s AIX development team updates the AIX Time Zone Database to ensure it is in sync with the changes in DST rules.
The Timezone Update Tool streamlines the process of updating AIX Time-Zone rules whenever there is a modification of DST changes from IANA. The tool is interactive and provides way to managing Time Zones, facilitating easy updates. The TZ tool uses (TZ) the Perl scripting language, which are available with the AIX base release. The tool is released as a part of AIX 7.3.3 TL.
Steps to getting started with the tool
Launch the tool and start the session:
Start the TZ Automation Tool by entering the following command in the AIX system session or console:
$ /usr/sbin/tzupg.pl OR $ tzupg.pl
Once the TZ update tool session starts, it displays the main menu, as shown in the figure below. The user has three different choices prompted in the menu:
- Update Time Zone Database
- Print the updated zones
- Exit from the tool
Update Time Zone Database:
Choice 1 starts the time zone database update process, where the user is prompted to select the version they wish to update to or downgrade to.
The tool retrieves information about all available versions from the IANA server and displays only the versions released on or after the year 2020. Below is a sample representation of the list of versions as displayed by the tool:
The tool not only displays the available versions from the IANA server but also shows the current version installed on the AIX system for comparison. In the screen capture above, the current database version displayed is 2024a. The user can return to the main menu by simply pressing ‘x’.
The user needs to enter the index number corresponding to the version they wish to update on the system. Once the user selects the index number, the TZ tool downloads the corresponding database, extracts the tarball, and compiles the extracted database source code.
After successful compilation, the tool installs the newly compiled binaries and updates the system. The TZ tool then displays the updated zones compared to the current version. By pressing Enter (or any key), the user can return to the main menu.
The TZ tool also allows the user to downgrade the version by simply selecting the corresponding index number.
Print the updated zones:
Choice 2 displays the updated time zones compared to the earlier time zone database on the system. The tool performs a checksum calculation for each binary internally to determine which zones have been newly updated.
Exiting from the tool:
The TZ tool allows the user to exit by selecting option 3. This will terminate the tool.
Verifying Time Zone changes:
- Use the following command to display the currently installed time zone database version:
$cat /usr/share/lib/tz/version
- Use the zdump command to check detailed time zone information for a specific zone:
$ zdump –v [TimeZone]
Examples
$ zdump -v /usr/share/lib/zoneinfo/EST5EDT
$ zdump -v /usr/share/lib/zoneinfo/America/New_York
- To confirm the system is using the correct time zone, run:
$ echo $TZ
- After updating the database, verify the system date and time:
$ date
- Confirm the updated files in the time zone database directory:
$ ls -l /usr/share/lib/zoneinfo
- If specific applications rely on time zone data, restart them and validate their time zone behavior to confirm the changes are effective.
- Inspect log file (“/var/adm/ras/tz.log”) to ensure timestamps are accurately reflecting the updated timezone.
Troubleshooting Time-Zone Update Challenges
Network Connectivity issue:
Ensure proper network connectivity to download the latest time zone database. If the system does not have internet connectivity, the TZ tool will fail to function.
Certificate verification failure (Time synchronization issue):
As shown in the screen capture below, the system's time is not synchronized with the current time, causing certificate verification to fail. Consequently, the tool is unable to function.
Tool failed to download the Time Zone database:
If the tool fails to download the tarball, it will optionally prompt the user to manually download the database file from the IANA server. The user can then provide the path to the downloaded file interactively for the tool to proceed.
Permissions:
The tool strictly enforces a check to ensure that only the root user can run it, preventing other users from executing the tool. Therefore, it can be said that only the root user is authorized to run the tool and update the database.
Reference: