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, 04:00:00. Clocks were not changed.
Turkey is between +2 and +3 utc, so now it will stay in +3. Here you can see
https://www.timeanddate.com/time/change/turkey/ankara?year=2016
*Information above is taken from this link of which problem is similar with mine. (Java timezone in turkey (rejected daylight saving))
Until today, manufacturers have provided some solutions about it. For example, Windows configured a timezone - (UTC+03:00) Istanbul - for Turkey. However, some problems about the same topic still continues like mine.
I develop Java web application that uses jdk1.8.0_101. I make it run over Apache Tomcat 7.0. In this application sometimes I use date objects. But, when I get date object (new Date()), I see that default timezone of JVM is different from the timezone of OS(Windows but different versions) that the application runs over.
I test it on three different environment. I use same java code and same jdk version in each environment. Java code is;
TimeZone zone = TimeZone.getDefault();
System.out.println(zone.getDisplayName());
System.out.println(zone.getID());
TEST CASE-1) My laptop - Windows 10 Pro (Administrator user) - new Date() object returns Wed Dec 21 10:00:38 EET 2016 Test Code Result:
Eastern European Time
Asia/Istanbul
==================================
TEST CASE-2) My Dektop PC - Windows 7 Service Pack 1 (Restricted user on the company network) - new Date object returns Wed Dec 21 10:00:38 EET 2016 Test Code Result:
Eastern European Time
Asia/Istanbul
==================================
TEST CASE-3) Virtual Server - Windows Server 2008 R2 Enterprise (Administrator user) - new Date object returns Wed Dec 21 11:03:11 GMT+03:00 2016 Test Code Result:
GMT+03:00
GMT+03:00
==================================
**** In 3rd test case, virtual server returns right date information, but in others, they return wrong date. I know that I can set timezone while getting date object. However, the project is big and it means a lot of date object that I have to correct it. Also, 3rd test case shows us that the problem can be solved by configuring the system date/time. What can I do about it? I wait for your recommendations.