I am using scalike as a simple sql connector.
To retrieve sql.timestamp to LocalDateTime we use wrappedResultSet.localDateTime(1).
Unfortunately, it does add an offset (+1 in my case).
By digging the scalike code, I have seen this is a "feature":
implicit def javaTimeLocalDateTime(implicit z: OverwrittenZoneId): TypeBinder[LocalDateTime] =
Binders.sqlTimestamp.map(Binders.convertJavaTimeLocalDateTime(z.value))
How could I convert sql.timestamp to LocalDateTime without adding any offset ?
I already tried by overloading the z value without success
implicit val z: OverwrittenZoneId = OverwrittenZoneId(ZoneId.of("UTC"))