we have stumbled upon changed behaviour reading timestamp with timezone from postgres between vert.x versions 4.1.8 an 4.2.x.
After further investigations I found out, that this change is due to the following difference (from JDBCQueryAction in 4.1.8 and JDBCDecoderImpl in 4.2.x (since 4.2.0)):
4.1.8:
if (value instanceof Timestamp) {
return ((Timestamp) value).toInstant().atOffset(ZoneOffset.UTC);
}
4.2.4:
if (value instanceof Timestamp) {
return ((Timestamp) value).toLocalDateTime().atOffset(ZoneOffset.UTC);
}
This difference moves the real point in time of the delivered times from the postgresql db in our implementation by the difference of the timezones between the source zone and the constant zone UTC.
Is this intended and if yes, can someone please give me a hint why?
If more information is needed, please just ask and I will try to provide it (and no, until now I do not have a reproducer/test case for it).
Currently I am just trying to find out, if the changed behaviour is intended (then we will have to change our implementation) or it was implemented by mistake and will be reverted.
Thx
Jan