12.02.2021 18:04, Dimitry Sibiryakov wrote:
Hello All.
I'm trying to get current timestamp without time zone in UTC without messing with session settings but... I cannot figure out how
to.
"localtimestamp" results in timestamp in current time zone.
"localtimestamp at time zone 'UTC'" results in timestamp with time zone.
"cast(localtimestamp at time zone 'UTC' as timestamp without time zone)"
results in timestamp in current time zone again.
Syntax "cast(current_timestamp as timestamp without time zone at time zone
'UTC')" does not exist.
Any idea?
For UTC you may try something like
dateadd(hour, -extract(timezone_hour from localtimestamp),
localtimestamp)
Regards,
Vlad
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel