TIMESTAMP and transformation across time zones
When dealing with higher-value precision, the TIMESTAMP
data type is available to serve up to nanosecond precision. There are also two functions for getting the current date and time representation: systemtimestamp
and current_timestamp
. The systemtimestamp
function is part of the STANDARD
package owned by the SYS
user. The full name (owner.package_name.function_name
) does not need to be specified since the public synonym is already specified. Thus, just using the name in the direct reference is sufficient. It provides the time zone on the server (database) side. The following code shows the systimestamp
function call:
select SYS.STANDARD.systimestamp from dual; select systimestamp from dual; --> 08.03.22 13:53:10,324000000 +00:00
The reference of the local timestamp of the session can be obtained by a current_timestamp
function call, which is part of the STANDARD
package owned by the SYS
user as well:
select SYS.STANDARD.current_timestamp...