8 Kasım 2015 kış saatı uygulaması (yaz saati uygulamasının sona ermesi) için sunucuda yapılması gerekenler:
Ntp sunucu kullanılıyor olsanız dahi patch'i uygulamak durumundasınız.
Redhat Linux kış saati 6.5 üzerinde yaptığım işlemler
Eğer redhat 6 tabanlı bir sisteminiz varsa aşağıdaki rpm kurulumu işinizi görecektir.Eğer redhat 7 tabanlı bir sisteminiz varsa buna uygun rpm'i yüklemelisiniz. Patch kurulumu sonrası sisteminizin otomatik saat güncellemesini alabimesi için doğru timezone'da olduğunuzu da teyid etmelisiniz. (Bknz:
http://siyahsapkaorg.blogspot.com.tr/2015/10/linux-how-to-get-timezone-information.html)
[root@node1 ~]# rpm -Uvh http://mirror.centos.org/centos/6/updates/x86_64/Packages/tzdata-2015g-2.el6.noarch.rpm
Retrieving http://mirror.centos.org/centos/6/updates/x86_64/Packages/tzdata-2015g-2.el6.noarch.rpm
warning: /var/tmp/rpm-tmp.pTNoiM: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:tzdata ########################################### [100%]
[root@node1 ~]# zdump -c 2015,2016 -v "Europe/Istanbul"
Europe/Istanbul -9223372036854775808 = NULL
Europe/Istanbul -9223372036854689408 = NULL
Europe/Istanbul Sun Mar 29 00:59:59 2015 UTC = Sun Mar 29 02:59:59 2015 EET isdst=0 gmtoff=7200
Europe/Istanbul Sun Mar 29 01:00:00 2015 UTC = Sun Mar 29 04:00:00 2015 EEST isdst=1 gmtoff=10800
Europe/Istanbul Sun Nov 8 00:59:59 2015 UTC = Sun Nov 8 03:59:59 2015 EEST isdst=1 gmtoff=10800
Europe/Istanbul Sun Nov 8 01:00:00 2015 UTC = Sun Nov 8 03:00:00 2015 EET isdst=0 gmtoff=7200
Europe/Istanbul 9223372036854689407 = NULL
Europe/Istanbul 9223372036854775807 = NULL
https://rhn.redhat.com/errata/RHEA-2015-1863.html
https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1503560
https://phoneboy.com/1381/use-ntp-you-still-need-daylight-saving-time-patches/
FreeBSD kış saati 8.3 x86_64 sistem üzerinde yaptığım işlemler:
tedbir amaçlı eski zoneinfo dosyalarımızın backup'ını alalım
# tar -pczf zoneinfo-backup.tgz /usr/share/zoneinfo-backup
zone dosyamızın yolunu öğrenelim
Bu dosyayı güncel olanı ile değiştireceğiz.
# ls -al /etc/localtime
lrwxr-xr-x 1 root wheel 35 Jun 11 2014 /etc/localtime -> /usr/share/zoneinfo/Europe/Istanbul
# pwd
/root
# mkdir tz
# cd tz
# wget --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz'
# gzip -dc tzcode-latest.tar.gz | tar -xf -
# gzip -dc tzdata-latest.tar.gz | tar -xf -
# make TOPDIR=/root/tz install
zone dosyamızı güncelleyelim
# cp /root/tz/etc/zoneinfo/Europe/Istanbul /usr/share/zoneinfo/Europe/Istanbul
ve son olarak kontrol işlemlerimizi gerçekleştiriyoruz:
# date "+%Z %z"
EEST +0300
# zdump -c 2015,2016 -v /etc/localtime
/etc/localtime Sun Jan 0 00:00:00 1900 UTC = Sun Jan 0 00:00:00 1900 LMT isdst=0 gmtoff=0
/etc/localtime Sun Jan 0 00:00:00 1900 UTC = Sun Jan 0 00:00:00 1900 LMT isdst=0 gmtoff=0
/etc/localtime Sun Mar 29 00:59:59 2015 UTC = Sun Mar 29 02:59:59 2015 EET isdst=0 gmtoff=7200
/etc/localtime Sun Mar 29 01:00:00 2015 UTC = Sun Mar 29 04:00:00 2015 EEST isdst=1 gmtoff=10800
/etc/localtime Sun Nov 8 00:59:59 2015 UTC = Sun Nov 8 03:59:59 2015 EEST isdst=1 gmtoff=10800
/etc/localtime Sun Nov 8 01:00:00 2015 UTC = Sun Nov 8 03:00:00 2015 EET isdst=0 gmtoff=7200
/etc/localtime Thu Dec 31 15:00:00 2015 UTC = Sat Dec 3 17:30:07 219250468 EET isdst=0 gmtoff=7200
/etc/localtime Sat Dec 3 17:30:07 219250468 UTC = Sun Dec 4 17:30:07 219250468 EET isdst=0 gmtoff=7200
Java Virtual Machine için time zone ayarı:,
java-1.7.0-openjdk-1.7.0.55-2.4.7.1.0.1.el6_5.x86_64
# export TZ=Europe/Istanbul ; java -jar /tmp/hede.jar ; date "+%Z%z %F %T"
Tue Oct 27 13:43:56 EEST 2015
Europe/Istanbul
Current time in milliseconds = 1445942636596 => Tue Oct 27 13:43:56 EEST 2015
Current time zone: Europe/Istanbul
EEST+0300 2015-10-27 13:43:56
http://www.java-examples.com/get-current-timezone-using-java-calendar
Eğer openjdk kullanıyorsanız. oracle jdk tzupdate yöntemi ile elde ettiğiniz timezone dosyalarını /usr/share/javazi/ dizinine kopyalamalısınız.
$ java -jar get-time-zone.jar
Tue Oct 27 15:21:28 EET 2015
Europe/Istanbul
Current time in milliseconds = 1445952088773 => Tue Oct 27 15:21:28 EET 2015
Current time zone: Europe/Istanbul
$ sudo cp -pfr openjdk/javazi/* /usr/share/javazi/
$ java -jar get-time-zone.jar
Tue Oct 27 16:22:02 EEST 2015
Europe/Istanbul
Current time in milliseconds = 1445952122068 => Tue Oct 27 16:22:02 EEST 2015
Current time zone: Europe/Istanbul
$ ls openjdk/javazi/
Africa Antarctica Atlantic CET EET EST5EDT Europe HST MET MST7MDT PST8PDT WET
America Asia Australia CST6CDT EST Etc GMT Indian MST Pacific SystemV ZoneInfoMappings