On 02/09/2019 05:17, Vlad Khorsun wrote: > 30.08.2019 19:15, Adriano dos Santos Fernandes wrote: >> On 30/08/2019 08:48, Alex Peshkoff via Firebird-devel wrote: >>> >>> >>> 1. Let's use SQL subtype in order to represent in the message UTC or >>> regional time, i.e. for time with time zone 2 subtypes will make sense >>> - UTC format or regional format. When user provides message format >>> information in execute/prepare this unambiguously defines format of >>> time with timezone. Pay attention - when time is returned as UTC >>> initial regional code or offset is anyway present in timezone. That >>> makes time information as flexible as possible. Appropriate session >>> setting is required to make server know what format should be used by >>> default: >>> ALTER SESSION SET TIME WITH TIME ZONE TO {UTC | REGIONAL} >>> >> Maybe you didn't understood how the things work. >> >> Time is *already* returned in UTC with a additional region code. >> >> If a client cannot or do not want to work with the region, it should >> just use the time value. >> >> Why do you want to introduce a setting that adds no value? > > If client can't work with region code, it can't display time in > *original* > (regional) format. UTC time is non-sence for end-user who expect to see > regional time. In this case client could ask server to convert time portion > of TSTZ value into region time (instead of UTC). Then client just display > time and region name (easily obtained from region code without usage of > external facilities, such as ICU). For end user it is transparent > operation. > > Yes, client could SET TIME BIND LEGACY, but in this case it will not be > able to display region name and it have to change internal bindings from > TSTZ to TS. >
The "problem" is make tools display things without ICU (!), then tools set prepared metadata changing it to char/varchar. Problem fixed, no code changed needed. No new hack for a single data type. Adriano Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel