On 13-02-2021 12:06, Dimitry Sibiryakov wrote:
13.02.2021 12:00, Mark Rotteveel wrote:
Firebird already has a TRUNC.
That's good, no need for another reserved word.
The current behaviour of CAST to me makes more sense than the
behaviour defined in the standard. I can see that there might be cases
when you might want the time without time zone information as in the
original zone, but I think those cases are rare.
Even if those cases are rare the problem is that currently there is
no straight way to get it without perversions with cast-to-string or
subtraction of extracts.
Current behavior can be got with simple "cast(value at local as
timestamp)".
I see your point, and now I'm on the fence.
However if we're going to change this, we need to ensure that data type
binding to WITHOUT TIME ZONE types will still work correctly (AFAIK, it
currently uses the same code path as a cast), that is: render in the
session time zone.
Mark
--
Mark Rotteveel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel