On 2020-03-09 17:48, Tony Whyman wrote:
My reading is that when the server's ICU is used, TIMESTAMP/TIME with
TIME ZONE values are returned as UTC  with both the time zone id and
the time zone offset as computed by the server's ICU taking into
account any daylight savings time variations.

I presume that in extended mode, when a TIMESTAMP/TIME with TIME ZONE
is used as a statement parameter, the value is passed to the server as
a local time plus the time zone id and the server's ICU is used to
convert this to UTC before evaluating the query.

To be clear, WITH TIME ZONE values are passed as UTC values both in the normal and 'extended' mode. The only difference is that the normal format has 2 bytes (4 bytes over the wire) with the offset in minutes **or** the zone id, and the 'extended' format has an additional 2 bytes (4 bytes over the wire) that always contain the offset in minutes (so for offset based values, extended will contain the offset twice, and a named zone based value will contain a zoneid and the offset.

If you want them as local time values, you must bind to 'LEGACY' (the WITHOUT TIME ZONE types).

Mark


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to