TIMESTAMPT and TIMESTAMPTZ unexpected results

117 views
Skip to first unread message

Asher Tarnopolski

unread,
Feb 6, 2022, 1:07:50 PM2/6/22
to vert.x
Hi, with version 4.2.4 I am getting the following while trying to retrieve TIMESTAMPT and TIMESTAMPTZ columns values from  Postgres DB:

"TIMESTAMPT_COL" :  {
    "nano" : 482753000,
    "year" : 2022,
    "monthValue" : 2,
    "dayOfMonth" : 6,
    "hour" : 17,
    "minute" : 47,
    "second" : 56,
    "dayOfWeek" : "SUNDAY",
    "dayOfYear" : 37,
    "month" : "FEBRUARY",
    "chronology" : {
      "calendarType" : "iso8601",
      "id" : "ISO"
    }
  }

"TIMESTAMPTZ_COL" : {
    "offset" : {
      "totalSeconds" : 0,
      "id" : "Z",
      "rules" : {
        "fixedOffset" : true,
        "transitions" : [ ],
        "transitionRules" : [ ]
      }
    },
    "nano" : 828699000,
    "year" : 2022,
    "monthValue" : 2,
    "dayOfMonth" : 6,
    "hour" : 19,
    "minute" : 5,
    "second" : 22,
    "dayOfWeek" : "SUNDAY",
    "dayOfYear" : 37,
    "month" : "FEBRUARY"
  }
with an exception in the logs: [io.vertx.ext.jdbc.spi.JDBCDecoder]: Error when convert SQL date time. Try coerce value
org.postgresql.util.PSQLException: Cannot convert the column of type TIMESTAMPTZ to requested type timestamp.

I don't think this I've seen the same behavior in 4.1.x where a formatted string was returned. 

Asher Tarnopolski

unread,
Feb 6, 2022, 1:09:50 PM2/6/22
to vert.x
sorry for a typo: TIMESTAMP, no TIMESTAMPT

Asher Tarnopolski

unread,
Feb 7, 2022, 2:49:34 AM2/7/22
to vert.x
I created an issue with the reproducer for convenience : https://github.com/vert-x3/vertx-jdbc-client/issues/263
Reply all
Reply to author
Forward
0 new messages