The following piece of code:
TimeZone.getTimeZone("Europe/Athens").inDaylightTime(new Date(200, 8, 14));
returns true
, much like it does for the year 2011. However, Daylight Saving Time (DST) was only proposed 100 years or so ago, and applied even more recently. Is the time in the year 200 considered DST, or is this a Java quirk?
You are mistaken. It works as expected when you use the date new Date(-1700, 8, 14)
(which is year 200
). The constructor you are using is adding 1900
to your year. You are actually using year 2100
.
Check the Date constructor api.