This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
How to find out DST begin and end date in every year(US - CST)? I know DST starts in first Sunday of April and ends in last Sunday of October.
Here is my actual issue. For a any given date, my method will add given number of days and return the date.
Here is what my code look like... private static final long DAY_MILLIES = 24*60*60*1000;
long datemillies = fromDate.getTime(); datemillies += (DAY_MILLIES*no_of_days); return new java.sql.Date(datemillies);
It works fine if this happens within DST or actual time. But I gave DST time (eg.Sep 9 2005) and add some number of days (eg 90 days) which is returning the actual(non-DST) time. Here is the issue. I didn't count the last Sunday of october is 25 hours day. So I am getting the wrong date back.