On 25/07/2025 08:50, Tomasz Dubiel wrote:
> Hello.
> When we have DataTypeCompatibility set to 3.0, we have a problem:
The datatype compatability only applies on the edge (communication
between client and server). If you want to use TIME [WITHOUT TIME ZONE],
switch to using LOCALTIME, not CURRENT_TIME (and LOCALTIMESTAMP not
CURRENT_TIMESTAMP for TIMESTAMP [WITHOUT TIME ZONE]).
The difference, IIRC, is that in the first case the timezoneless value
is converted to a TIME WITH TIME ZONE to perform the comparison, and
IIRC this uses the offset on January 1st 2020, making the time off by 1
hour compared to your expectation.
In the second case, you're converting the TIME WITH TIME ZONE to a TIME
[WITHOUT TIME ZONE].
Mark
--
Mark Rotteveel