I have a problem when converting the following ISO string 2017-09-01T01:00:00.000Z
into a date.
I'm using SimpleDateFormat
as follows
SimpleDateFormat stringToDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
Date date = stringToDate.parse("2017-09-01T01:00:00.000Z");
The date object output has a date that looks like this
Fri Sep 01 01:00:00 MDT 2017
When I should get an output of
Fri Sep 01 01:00:00 UTC 2017
OR
Fri Aug 31 19:00:00 MDT 2017
It looks like it is not doing the timezone conversion correctly because the time is unchanged, but the timezone has been when neither or both should be changed.