Use fbclient-interfaces to decode time-fields with time zone. #362
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR ueses fbclient lib to decode ISC_TIME_TZ / ISC_TIME_TIMESTAMP-structs.
AFAICS isql does it the same way.
However, the following commands produces different result (flamerobin <-> isql).
TODO
[ ] (3) analyse "select cast('2018-01-01 16:01:19 America/Sao_Paulo' as timestamp with time zone)(my icu was outdated; 2019)from rdb$database;"
It returns ... 15:01 ... (fbclient-lib bug?)
[ ] (4) select current_time(stamp) returns the wrong time too. I've modified fbclient-lib to get the expected value. I'm unsure if it is a fbclient-lib bug? (common/TimeZoneUtil.cpp:TimeZoneUtil::decodeTimeStamp - line ~ 770 - i've commented "+ icuLib.ucalGet(icuCalendar, UCAL_DST_OFFSET, &icuErrorCode)" out.[ ] (4a) regardless bug or not - a fix for the the "may-be-buggy"-fbclient-lib is needed.Yes: Short story - tzdata directory was missing. Should be on the same directory as fbclient.dll.
Yes: Short story - self-build or old libfbclient with outdated time-zone database.
To point (4):* isql calls setlocale(LC_CTYPE, ""); (~ line 771) .... so it's startet with no locale (GMT-TimeZone). "+ icuLib.ucalGet(icuCalendar, UCAL_DST_OFFSET, &icuErrorCode)" is 0 and has no affect.