I have this application which compares current date to a parsed date from an xml file:
Date timeDiff = new Date(date.getTime() - new Date().getTime());
The problem is when i output the variable timeDiff as a string via simpleDateFormat, daylight saving time is taken to account which adds an extra hour. This messes up my output.
Is there anyway to make SimpleDateFormat ignore DST?
Thanks!
Ok guys! Maybe better with this solution: