Skip to content

IsoFormattingDateDataFormatter does not work #121

Closed
@szmeti

Description

@szmeti

IsoFormattingDateDataFormatter reads the value as a LocalDateTime and then attempts to format it as an ISO_OFFSET_DATE_TIME. A LocalDateTime does not have zone offset information, therefore this always fails with an exception:

java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds

A simple test to test this:

@Test
void dateTest() throws Exception {
  LocalDateTime now = LocalDateTime.now();
  now.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
}

Am I missing something?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions