On 2019-01-20 15:30, Jorge Gonçalves wrote:
according to the time zone documentation the time_zone member in the
ISC_TIME_TZ and ISC_TIMESTAMP_TZ structure returns the time zone
identifier or displacement.
There are any way to convert the time zone identifier to the
displacement on the client side ?
Be aware that the time communicated in ISC_TIME_TZ and ISC_TIMESTAMP_TZ
is UTC/GMT time. The zoneid is technically not necessary to use the time
unless you want to be able to reconstruct with the original zone/offset.
As far as I'm aware, fbclient doesn't offer anything to facilitate this
to avoid additional dependencies like ICU and keeping track of the time
zones supported by the server.
Zoneids between 0 and 2878 are offsets, and you can derive the offset in
minutes by subtracting 1439 for an offset between -23:59 and +23:59.
Higher zoneids should be mapped to the zone name listed in the
documentation (or table RDB$TIME_ZONES), and then you need to use the
timezone support in your programming language, OS or a library like ICU
to derive the offset applicable for that time zone at the specified UTC
time.
Mark
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel