Standard

No Summer Time for Azerbaijan…

Recently our government decided to cancel summer time switching…
So we need to make changes on our Linux/UNIX environment.
Here are steps how we can do it on Linux servers.

Check current rule:


# zdump -v Asia/Baku | grep 2016
Asia/Baku  Sat Mar 26 23:59:59 2016 UTC = Sun Mar 27 03:59:59 2016 AZT isdst=0 gmtoff=14400
Asia/Baku  Sun Mar 27 00:00:00 2016 UTC = Sun Mar 27 05:00:00 2016 AZST isdst=1 gmtoff=18000
Asia/Baku  Sat Oct 29 23:59:59 2016 UTC = Sun Oct 30 04:59:59 2016 AZST isdst=1 gmtoff=18000
Asia/Baku  Sun Oct 30 00:00:00 2016 UTC = Sun Oct 30 04:00:00 2016 AZT isdst=0 gmtoff=14400

We see that rule will be applied @Sun Mar 27 2016…

###############################
You can download new database from IANA released 12 March 2016.
It does not include changes for Azerbaijan…

# mkdir ./new_tz
# cd ./new_tz
# wget https://www.iana.org/time-zones/repository/releases/tzdata2016b.tar.gz
# tar -zxvf tzdata2016b.tar.gz

# cat ./asia  | grep Azer

# Azerbaijan
# From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
Rule    Azer    1997    max    -       Mar     lastSun  4:00   1:00    S
Rule    Azer    1997    max    -       Oct     lastSun  5:00   0       -
                        4:00    -       AZT     1996     # Azerbaijan Time
                        4:00    Azer    AZ%sT

# vi ./asia

136 # Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
137 Rule    Azer    1997    max     -       Mar     lastSun  4:00   1:00    S
138 Rule    Azer    1997    max     -       Oct     lastSun  5:00   0       -</pre>

Now we need to change max to 2015; it means that rule will be applied last time @2015…

136 # Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
137 Rule    Azer    1997    2015     -       Mar     lastSun  4:00   1:00    S
138 Rule    Azer    1997    2015     -       Oct     lastSun  5:00   0       -

# zic ./asia
# tzdata-update

##############################
##############################

I have mirrored ready archive to be just implemented on Linux servers….

# wget http://anit.az/tzdata2016b_BAKU_2015.tar.gz
# tar -xvf ./tzdata2016b_BAKU_2015.tar.gz
# cd ./new_tz
# zic ./asia
# tzdata-update

#######CHECK NEW RULE

# zdump -v Asia/Baku | grep 2015 || zdump -v Asia/Baku | grep 2016

Asia/Baku  Sat Mar 28 23:59:59 2015 UTC = Sun Mar 29 03:59:59 2015 AZT isdst=0 gmtoff=14400
Asia/Baku  Sun Mar 29 00:00:00 2015 UTC = Sun Mar 29 05:00:00 2015 AZST isdst=1 gmtoff=18000
Asia/Baku  Sat Oct 24 23:59:59 2015 UTC = Sun Oct 25 04:59:59 2015 AZST isdst=1 gmtoff=18000
Asia/Baku  Sun Oct 25 00:00:00 2015 UTC = Sun Oct 25 04:00:00 2015 AZT isdst=0 gmtoff=14400

# date
Sat Mar 19 16:47:03 AZT 2016

we never will see such format for Azerbaijan:

Thu Aug 27 02:49:26 AZST 2015

AZST ST means Summer Time :)

Until now it will always show as AZT …Just time, no summer time anymore for Azerbaijan…:)

###############################

SOLARIS 9/10 fix:

vi /usr/share/lib/zoneinfo/src/asia

Same rule, change max to 2015.

#
Rule   Azer    1997    2015     –       Mar     lastSun  4:00   1:00    S
Rule   Azer    1997    2015     –       Oct     lastSun  5:00   0       –
#

zic /usr/share/lib/zoneinfo/src/asia

###############################

Linux Debian DST fix…

# wget http://anit.az/tzdata2016b_BAKU_2015.tar.g
# tar -xvf ./tzdata2016b_BAKU_2015.tar.gz
# cd ./new_tz/
# zic ./asia
# dpkg-reconfigure tzdata
set Asia/Baku…

root@debie ~/new_tz # cat /etc/debian_version
7.2
root@debie ~/new_tz # date
Mon Mar 28 14:25:51 AZT 2016

Done….

more