in Unix

Fixing Incorrect DST for Azerbaijan in Different Operating Systems

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:

  1. 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.
  2. 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
AZT-4AZST
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:
TZ=AZT-4AZST
export TZ

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.

References

Please send comments to rustam@code

Last modified Wednesday, 25 October 2005

Write a Comment

Comment

31 Comments

  1. You can definitely see your enthusiasm within the article you write.

    The sector hopes for even more passionate writers such as
    you who aren’t afraid to say how they believe. Always follow your heart.

  2. Wow that was unusual. I just wrote an very long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m not writing all that over again.

    Anyhow, just wanted to say excellent blog!

  3. I’m impressed, I must say. Seldom do I encounter a blog that’s equally educative and interesting, and let
    me tell you, you have hit the nail on the head.
    The problem is something that too few people are
    speaking intelligently about. Now i’m very happy that I came across this in my hunt for something concerning this.

  4. Hmm it looks like your website ate my first comment (it was super long) so I guess
    I’ll just sum it up what I had written and say, I’m thoroughly
    enjoying your blog. I too am an aspiring blog writer but I’m still new to the whole thing. Do you have any suggestions for novice blog writers? I’d really appreciate it.

  5. Hi there, i read your blog occasionally and i own a similar one and i was just curious
    if you get a lot of spam feedback? If so how do you reduce it, any plugin or anything you can recommend?
    I get so much lately it’s driving me crazy so any help is very much appreciated.

  6. You could definitely see your expertise in the work you write.
    The world hopes for more passionate writers such as you who
    are not afraid to mention how they believe.
    At all times go after your heart.

  7. Hi there would you mind sharing which blog platform you’re working with? I’m
    going to start my own blog soon but I’m having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking
    for something completely unique. P.S Apologies for getting off-topic but I had to
    ask!

  8. Unquestionably imagine that which you stated.

    Your favorite justification appeared tto be on thhe net the simplest factor to tke into account of.
    I say to you,I definitely get irked while other people consider issues that they just don’t realize
    about. You controlled to hit the nail upon the top
    and also defined out the entire thing with no need side-effects , people could take a signal.

    Will likely be back to get more. Thanks

  9. 豆腐鱼头汤是家常菜菜谱之一,南京鼻炎哪家医院好,置信良多家庭的一样平常菜谱都有鱼头汤,那末,怎么做出大饭馆里色喷鼻味俱全的鱼头&#2

  10. 山东“毒姜”事务——《核心访谈》等报导:“毒姜产地竟是无机产物树模区,病毒性皮肤病怎么治疗,潍坊市峡山区两年前的生姜莳植面积15000亩&#8

  11. 《中国共产党章程》、《中国共产党清廉自律准则》和《纪律处分条例》是在新在汗青前提下,对峙依规治党以德治党对党员提出了更高更严&#26

  12. 酒事于华夏,已有五千余载的汗青。在其间,饮者可谓不可胜数,我想,这无数的饮者若是同在一朝,且邀约共饮,恐怕要在蒙古大草原才可&#38

  13. While in uncertainty, check out anything you can’t have to shed or abandon it at your home. Cheap NFL Jerseys . It will not be exaggeration in the direction of assert that stage of accomplishment and reliability of the worldwideweb host are specifically proportional in direction of each individual other. Cheap Jerseys From China . A good portion of this business relies on how you interact with brokers, buyer, sellers, engineers and city municipalities. Resources are restricted and joblessness is

  14. [高效除湿品牌]: 关注除湿机的压缩机的同时,不得不说热交换器(冷凝器和蒸发器)。目前拥有0.1mm高度度翅片,钛金亲水铝箔,梯形内螺纹铜&#31