I have a problem whereby the Calendar.getTime() method changes the timezone (probably to be in line with the JVM).
Calendar cal = javax.xml.bind.DatatypeConverter.parseDateTime("2017-10-20T07:10:08.123458Z");
Date datrFromCal = cal.getTime();//Adds two hours(GMT+2:00)
Is there any way to stop this movement from GMT+0 to GMT+2 when calling cal.getTime()
?
P.s. We use Java 7 at my company.
Another thing related to this is the support for microseconds. I have read a lot about Java 7 and below not supporting microSeconds (when parsing a String), but is there any suggestions to get around this?