Код: Выделить всё
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'");
String transactionTime = "2019-02-26T13:43:12Z";
OffsetDateTime txnTime = OffsetDateTime.from(OffsetDateTime.parse(transactionTime, DATE_TIME_FORMATTER).toInstant());
Код: Выделить всё
Text '2019-02-26T13:43:12Z' could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor: {},ISO resolved to 2019-02-26T13:43:12 of type java.time.format.Parsed
Знаете, как это исправить?
Подробнее здесь: https://stackoverflow.com/questions/793 ... alaccessor
Мобильная версия