posted 13 years ago
What's the best way to convert XMLGregorianCalendar to Calendar with timezone information.
I have been doing like this so far. I need to do this because I need to compare dates in my code.
The app works on Dallas (CDT/CST) time. Now the xmlCalendar.getTimezone() is shown as -360.
At times the server is not able to convert this -360 to CST and hence the above code converts the time wrongly to GMT.
What's the best way to avoid this? Can I do -1 * xmlCalendar.getTimezone(), create a Calender for GMT timezone and add the multiplied figure?