ADDITIONAL SYSTEM INFORMATION :
JDK 12
A DESCRIPTION OF THE PROBLEM :
I am trying to parse a ZonedDateTime from a String of the format (yyyy-MM-dd HH:mm z). The input String (2019-08-29 00:00 IST) generates a UTC timestamp.
Debugging led me to a point where the ZoneId for IST was mapped to Atlantic/Reykjavik which doesn't make sense. It should be mapped Asia.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
It can be reproduced as follows -
timestamp = ZonedDateTime.parse(timeInput, DATE_WITH_TIMEZONE_FORMATTER)
.toInstant().toEpochMilli()
where
DateTimeFormatter DATE_WITH_TIMEZONE_FORMATTER = DateTimeFormatter
.ofPattern(DATE_TIME_WITH_TIMEZONE_PATTERN).withChronology(IsoChronology.INSTANCE);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expecting the output to be in IST
ACTUAL -
Zone Id is Atlantic/Reykjavik
JDK 12
A DESCRIPTION OF THE PROBLEM :
I am trying to parse a ZonedDateTime from a String of the format (yyyy-MM-dd HH:mm z). The input String (2019-08-29 00:00 IST) generates a UTC timestamp.
Debugging led me to a point where the ZoneId for IST was mapped to Atlantic/Reykjavik which doesn't make sense. It should be mapped Asia.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
It can be reproduced as follows -
timestamp = ZonedDateTime.parse(timeInput, DATE_WITH_TIMEZONE_FORMATTER)
.toInstant().toEpochMilli()
where
DateTimeFormatter DATE_WITH_TIMEZONE_FORMATTER = DateTimeFormatter
.ofPattern(DATE_TIME_WITH_TIMEZONE_PATTERN).withChronology(IsoChronology.INSTANCE);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expecting the output to be in IST
ACTUAL -
Zone Id is Atlantic/Reykjavik