Turkey decided recently (September 6, 2016 ) to permanently stay in Daylight Saving Time (DST). This act canceled the ending of DST previously scheduled for October 30, 2016
The Answer by Magnilex is correct, and should be accepted. Anybody concerned with time in Turkey needs to immediately update their tz
database bundled with Java.
Version tzdata2016g
of the time zone data files has the change for Turkey that you need.
Turkey switched from EET/EEST (+02/+03) to permanent +03, effective 2016-09-07.
And version tzdata2016h
has some fixes for Turkey in the 1980s and 1990s.
In Turkey, transitions in 1986-1990 were at 01:00 standard time not at 02:00, and the spring 1994 transition was on March 20, not March 27.
But the current Java SE 8 Update 111 & 112 have the earlier version tzdata2016f
.
tz
not updated as of Java 8 Update 111My experiment below shows this last-minute change in time zone by the government of Turkey was not included in the tz database bundled with the most recent update to Java from Oracle, Java 8 Update 111.
Get first moment on the day DST was previously scheduled to end. Then add one hour at a time to see if clock jumps or not.
System.out.println ( "java.version: " + System.getProperty ( "java.version" ) );
ZoneId z = ZoneId.of ( "Europe/Istanbul" );
ZonedDateTime zdt = ZonedDateTime.of ( 2016 , 10 , 30 , 0 , 0 , 0 , 0 , z );
System.out.println ( " zdt: " + zdt );
System.out.println ( "zdt + 1: " + zdt.plusHours ( 1 ) );
System.out.println ( "zdt + 2: " + zdt.plusHours ( 2 ) );
System.out.println ( "zdt + 3: " + zdt.plusHours ( 3 ) );
System.out.println ( "zdt + 4: " + zdt.plusHours ( 4 ) );
System.out.println ( "zdt + 5: " + zdt.plusHours ( 5 ) );
System.out.println ( "zdt + 6: " + zdt.plusHours ( 6 ) );
When run. At 4 AM, the clock jumps back to repeat the 03:00 hour. This meant DST ended, but should not have if we were up-to-date with new Turkish law.
java.version: 1.8.0_111
zdt: 2016-10-30T00:00+03:00[Europe/Istanbul]
zdt + 1: 2016-10-30T01:00+03:00[Europe/Istanbul]
zdt + 2: 2016-10-30T02:00+03:00[Europe/Istanbul]
zdt + 3: 2016-10-30T03:00+03:00[Europe/Istanbul]
zdt + 4: 2016-10-30T03:00+02:00[Europe/Istanbul]
zdt + 5: 2016-10-30T04:00+02:00[Europe/Istanbul]
zdt + 6: 2016-10-30T05:00+02:00[Europe/Istanbul]
The prefered way to do this would be to update the JDK/JRE, if it includes the new timezone information. If it is not included, the correct, and official way to do this, should be to update the Timezone information using the Timezone Updater Tool.
The TZUpdater tool is provided to allow you to update installed Java Development Kit (JDK) and Java Runtime Environment (JRE) software with more recent timezone data, to accommodate daylight saving time (DST) changes in different countries. Oracle relies on the timezone data publicly available through IANA's Time Zone Database.
Oracle recommends that you use the latest Oracle Java SE platform JDK or JRE update release as the preferred means of delivering both timezone data updates and other product improvements, such as security fixes. To see which JDK or JRE update release incorporates the updated timezone data for your locale, see Timezone Data Versions in the JRE Software. However, if you are unable to use Oracle's latest JDK or JRE update release or if the timezone data on the latest release is not the most current one available, the TZUpdater tool provides a means of updating timezone data while leaving other system configuration and dependencies unchanged.
It is available as a download on the official Java SE download site (under the section Additional Resources).
Information about your particular case can be found here (where you can also see that the information is not available in a JRE release):
Turkey switched from EET/EEST (+02/+03) to permanent +03, effective 2016-09-07. New leap second 2016-12-31 23:59:60 UTC as per IERS Bulletin C 52.
How to use the tool is explained in the doucentation:
The TZUpdater tool modifies the JDK/JRE software instance that is used to execute the tool. A single image of the JDK/JRE software is modified per execution. To administer the tool to multiple instances of the JDK/JRE software, see the section Systemwide Usage.
For example, the below command would update the JRE with the latest information, where the changes in Turkey daylight saving should be included.
java -jar tzupdater.jar -l http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
Note that there is a current known issue since the 2016g release:
Due to formatting changes in the IANA-maintained tzdata bundle, the TZUpdater tool fails to determine the tzdata version when parsing the tzdata2016.tar.gz resource bundle.
Follow the steps from the below link in order to be able to use the latest tzdata bundle from IANA. When this is fixed, this section of the answer will be removed.