You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a PostgreSQL table with columns of TIMESTAMP WITH TIME ZONE.
Whenever we read a certain timestamp where the seconds are by accident zero, e.g.
2023-02-09 14:16:00 then we get back a OffsetDateTime object where the seconds are cut, e.g. 2023-02-09T13:16Z.
Finally, this representation can't be deserialized into java.time.Instant.
com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.Instant` from String "2023-02-09T13:16Z": Failed to deserialize java.time.Instant: (java.time.format.DateTimeParseException) Text '2023-02-09T13:16Z' could not be parsed at index 16
Caused by: java.time.format.DateTimeParseException: Text '2023-02-09T13:16Z' could not be parsed at index 16
at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2056)
at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1884)
at com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer._fromString(InstantDeserializer.java:302)
Timestamps with seconds not equal to zero are deserialized as expected.
To deserialize all fetched data into our objects we use the idiom
<row>.toJson().mapTo(<POJO>.class)
which calls in our context the toString() method of the OffsetDateTime property of the target class.
Do you have a reproducer?
Unfortunately, no
Steps to reproduce
In a postgreSQL database create a colum of type TIMESTAMP WITH TIME ZONE
Insert a value where the seconds are zero, e.g. 2023-02-09 14:16:00
try to deserialize into a type of java.time.Instant`
The text was updated successfully, but these errors were encountered:
Version
Vertx 4.3.8, vertx-jdbc-clinet 4.3.8
Context
We have a PostgreSQL table with columns of TIMESTAMP WITH TIME ZONE.
Whenever we read a certain timestamp where the seconds are by accident zero, e.g.
2023-02-09 14:16:00 then we get back a OffsetDateTime object where the seconds are cut, e.g. 2023-02-09T13:16Z.
Finally, this representation can't be deserialized into java.time.Instant.
Timestamps with seconds not equal to zero are deserialized as expected.
To deserialize all fetched data into our objects we use the idiom
which calls in our context the toString() method of the OffsetDateTime property of the target class.
Do you have a reproducer?
Unfortunately, no
Steps to reproduce
The text was updated successfully, but these errors were encountered: