On 2018-07-18 22:51, livius wrote:
Hi,

thank you for the link.
If i understand correctly then all functions "CURRENT_..." and
"LOCAL_..." result are in session TZ?

Note that it is LOCALTIME and LOCALTIMESTAMP, so no underscore there.

If yes, then now it is much clearer, I thought that "CURRENT_" state
for server time zone retrieved from e.g. system and "LOCAL_" was for
database timezone or something like this.

will be good if you provide some example in provided link.
Something like this (if I have not mistaken something):

old way FB3:
SERVER TZ = "-02:00"
CURRENT_TIMESTAMP will be "2018-07-18 23:00:00"
CURRENT_TIME will be "23:00:00"
CURRENT_DATE will be "2018-07-18"

new way FB4:
SERVER TZ = "-02:00"
SESSION TZ = "+02:00"

CURRENT_TIMESTAMP will be "2018-07-19 03:00:00 +02"
CURRENT_TIME will be "03:00:00 +02"

LOCAL_TIMESTAMP will be "2018-07-19 03:00:00"
LOCAL_TIME will be "03:00:00"
CURRENT_DATE will be "2018-07-19"


One more question.
How phisically are TZ info stored in field?
Is field alwas written in GMT and do not require any more bytes in the database?
And is converted to session timezone?

This is answered in https://github.com/FirebirdSQL/firebird/blob/work/time-zone-support/doc/sql.extensions/README.time_zone.md

Mark

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to