TypeTIME WITH TIME ZONE
Caution
Data type changed in Firebird 4.0 from TIME WITHOUT TIME ZONE
to TIME WITH TIME ZONE
. Use to obtain TIME WITHOUT TIME ZONE
.
Syntax
The optional precision argument is not supported in ESQL.
CURRENT_TIME
returns the current server time in the session time zone. The default is 0 decimals, i.e. seconds precision.
Note
CURRENT_TIME
has a default precision of 0 decimals, whereCURRENT_TIMESTAMP
has a default precision of 3 decimals. As a result, is not the exact sum ofCURRENT_DATE
andCURRENT_TIME
, unless you explicitly specify a precision (i.e.CURRENT_TIME(3)
orCURRENT_TIMESTAMP(0)
).
CURRENT_TIME
and Firebird 4.0 Time Zone Support
Firebird 4.0 added support for time zones. As part of this support, an incompatibility with the CURRENT_TIME
expression was introduced compared to previous version.
In Firebird 4.0, CURRENT_TIME
returns the TIME WITH TIME ZONE
type. In order for your queries to be compatible with database code of Firebird 4.0 and higher, Firebird 3.0.4 and Firebird 2.5.9 introduced the Section 11.11, LOCALTIME expression. In Firebird 3.0.4 and Firebird 2.5.9, is a synonym for CURRENT_TIME
.
In Firebird 4.0, LOCALTIME
continues to work as it does in Firebird 3.0.4 and higher and Firebird 2.5.9 (returning TIME [WITHOUT TIME ZONE]
), while CURRENT_TIME
now returns a different data type, TIME WITH TIME ZONE
.
Examples
select current_time from rdb$database