Skip to content

Commit

Permalink
add datetime test with zero fraction seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Aug 11, 2023
1 parent 95775ee commit 295cfad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public void fields() throws IOException {
localTime -> assertThat(localTime).isEqualTo("13:15:00.123"));
assertThat(fields.get("datetime")).isInstanceOfSatisfying(ZonedDateTime.class,
dateTime -> assertThat(dateTime).isEqualTo("2020-01-01T13:15:00.123Z"));
assertThat(fields.get("datetime-zero")).isInstanceOfSatisfying(ZonedDateTime.class,
dateTime -> assertThat(dateTime).isEqualTo("2020-01-01T13:15:00.000Z"));
assertThat(fields.get("time-simple")).isInstanceOfSatisfying(LocalTime.class,
localTime -> assertThat(localTime).isEqualTo("13:15:00"));
assertThat(fields.get("datetime-simple")).isInstanceOfSatisfying(ZonedDateTime.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"time": "13:15:00.123",
"time-simple": "13:15:00",
"datetime": "2020-01-01T13:15:00.123Z",
"datetime-zero": "2020-01-01T13:15:00.000Z",
"datetime-simple": "2020-01-01T13:15:00Z",
"datetime-offset": "2020-01-01T13:15:00-04:00",
"datetime-no-offset": "2020-01-01T13:15:00",
Expand Down

0 comments on commit 295cfad

Please sign in to comment.