Different operating systems use different approaches to track daylight saving time (DST). Unfortunately, almost all well known operating systems have incorrect daylight saving rules for Azerbaijan (capital Baku). As the level of enterprise in Azerbaijan grows, it is becoming necessary to keep track of the precise time. It is especially critical when it comes to banking, telecommunication and other enterprises, which require the correct time for billing operations or similar. This document provides a solution for the mentioned problem on a wide range of UNIX and Windows operating systems.
History of Daylight Saving on the Territory of Azerbaijan
After the collapse of the Soviet Union and the independence in 1990, Azerbaijan established and declared its own daylight saving rules. These rules have been changed a few
times then. The last changes to time zone and daylight saving time were made by the Cabinet of Ministers on 17 March 1997. Full text of this resolution in
English and Azeri can be found here. According to this resolution:
- In as much as every year since 1997 all clocks are advanced one hour at 4am on the last Sunday of March, Azerbaijan Republic must pass to summer time.
- By turning the clocks back an hour at 5am on the last Sunday of October, summer time is cancelled.
For clearance it should be noticed that Daylight Saving Time or DST is also called Summer Time in Azerbaijan as well as in many other countries.
Another interesting fact is that Azerbaijan is geographically located in UTC/GMT+3 time zone while it uses GMT+4. This particular time zone is beneficial in that it saves energy and allows people in Azerbaijan to enjoy maximum daylight.
Public Time Zone Database
The database which is often called tz or zoneinfo is a public-domain time zone database that has been in use since 1986 (or earlier)
and is maintained by Arthur David Olson. Time zone data are freely available here and at elsie.nci.nih.gov.
The site contains source code for time zone calculations that are part of the POSIX standard, and a set of worldwide time zone data that support these calculations.
It is updated periodically to reflect changes made by political bodies to UTC offsets and daylight saving rules. Regarding contributions from volunteers around the world,
this database is almost certainly the most complete and up-to-date source of time zone information.
Vast majority of UNIX and Linux distributions use this database, which consists of text files. These files describe when changes to the standard time zone corrections
from UTC/GMT occur, provide DST and historical changes for each time zone.
Updating the Data for the Azerbaijan Time Zone
Both daylight saving time changes for Azerbaijan are wrongly specified as becoming effective on 1:00am. It looks like the data was inherited
from the European Union, where Summer Time begins and ends on 1:00 am Universal Time/GMT.
The problem was reported and fixed on 24 October 2005. Nevertheless, all UNIX distributions using this source and which were released
before that have incorrect daylight saving information.
Solution for the Systems Supporting Public “zoneinfo” Database
Most UNIX systems use the standard approach to keep the time zone information and the same compiler for the new zone information. The proposed solution was tested on
following platforms: Solaris, Tru64, Linux and FreeBSD. However, this solution is not limited only to these systems and may be used on any system which uses the
“zic” zone information compiler from elsie.nci.nih.gov.
Note that HP-UX has its own format for zone information and daylight saving rules called tztab which is discussed in next section.
To update daylight saving rules for Azerbaijan – AZT/AZST you need to recompile the time zone for Asia/Baku. The file with correct Asia/Baku rules can be downloaded here. To install the updated zone information run:
# zic -v baku.fixed
On older systems (i.e. Solaris 8 ) which do not have Asia/Baku time zone information at all, the solution shown above could be used to create a new time zone data. After adding the new time zone information into system you can change your default time zone to Asia/Baku. For more detailed information about default time zone, see man page of your UNIX distribution.
Full versions of up-to-date time zone data files are available at ftp://elsie.nci.nih.gov/pub/ in a file called
tzdata*.tar.gz (the part of the name indicated by “*” changes from time to time). Usually, UNIX distributions include a binary version of “zic” compiler. However, if it is not available in your distribution, you can find the compiler for this data in an
archive called tzcode*.tar.gz in the same location. The compiler needs to be built, and then used to compile the raw description files into time zone data files.
Azerbaijan Time Zone and DST Data for HP-UX
HP developed their own proprietary tztab file format, which describes the differences between Coordinated Universal Time (UTC) and local time on HP-UX
operating system. This file contains information for a very limited number of zones even in OS version 11i v2 and does not have any data for Azerbaijan.
To add the Azerbaijan time zone information and daylight saving time to HP-UX, you need to append the lines below to /usr/lib/tztab file:
# Azerbaijan time zone
0 5 25-31 3 1997-2038 0 AZST-5
0 4 25-31 10 1997-2038 0 AZT-4
To switch to AZT/AZST zone change the /etc/TIMEZONE file and set the appropriate time zone name:
Finally, to activate the time zone you need to either logout/login or update your TZ environment variable as shown above.
Correction of DST on Microsoft Windows
Microsoft also has the problem with Azerbaijan daylight saving time. The most interesting thing is that Windows uses a single daylight saving rule set for a whole region called “Caucasus Daylight Time” which covers Baku (Azerbaijan), Tbilisi (Georgia) and Yerevan (Armenia). I think it is neither correct nor useful to group different countries into a single rule set. For instance, recently Georgia has decided to change its time zone offset and now it is GMT+3, while Azerbaijan and Armenia are GMT+4.
Fortunately, Microsoft has a Windows Time Zone Editor program distributed as a part of the Windows resource kit. Find the directory tools\reskit\config on your Windows installation CD, and run tzedit.exe. To correct the time zone data, just select the desired time zone from the
list, press the Edit button, and set the appropriate values for Daylight Saving Time start and end. For more information see the program’s Help.
- Public Time Zone Database home
- Daylight Saving Time in Wikipedia
- About Daylight Saving Time – history, rationale, laws and dates
- HP-UX tztab(4) man page
Please send comments to rustam@code
Last modified Wednesday, 25 October 2005