I would like to find out the easiest way in Java to get a list of dates in the future when daylight saving time changes.
One rather inelegant way to do this is to simply iterate over several days a day, testing them against TimeZone.inDaylightTime (). This will work, and I'm not worried about efficiency, since it will need to be launched every time my application starts, but I am wondering if there is an easier way.
If you're wondering why I am doing this, this is because I have a javascript application that needs to process third-party data containing UTC timestamps. I want a reliable way to translate from GMT to EST on the client side. See Javascript - Unix time for a specific time zone. I wrote some javascript that will do this, but I want to get the exact dates of the transition from the server.
java date dst
morgancodes Sep 19 '09 at 20:55 2009-09-19 20:55
source share