Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have an issue when comparing two dates with times. I have a date that was created during daylight savings time and a date after we changed back to standard time. For example, first date is on October 10 at 12:00pm. Second Date is on November 9th at 12:00pm. I am getting a 30 day and 1 hour difference in times instead of a 30 day difference. Is there a way to set the time on the first date to CST so that when calculating, we will have it in CST instead of CDT? I have tried using Calendar.setTimeZone("CST") but it is not working.
0 · ·