Oracle LOCALTIMESTAMP()
오라클 LOCALTIMESTAMP()
LOCALTIMESTAMP()
-
LOCALTIMESTAMP(timestamp_precision)
의 형태
LOCALTIMESTAMP returns the current date and time in the session time zone in a value of data type TIMESTAMP. The difference between this function and CURRENT_TIMESTAMP is that LOCALTIMESTAMP returns a TIMESTAMP value while CURRENT_TIMESTAMP returns TIMESTAMP WITH TIME ZONE value.
The optional argument timestamp_precision specifies the fractional second precision of the time value returned.
SQL > SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL ;
--> 2020/04/08 PM 21:39:06.268000 +09:00 2020/04/08 PM 21:39:06.268000
SQL> ALTER SESSION SET TIME_ZONE = '-5:00';
SQL> SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL ;
--> 2020/04/08 AM 7:40:21.098000 -05:00 2020/04/08 AM 7:40:21.098000