Im reviewing a trigger but im not able to understand the correct meaning.
This is the trigger DDL.
BEGIN
:new.C_DATE:=round((cast(sys_extract_utc(current_timestamp) as date) - TO_DATE('1970-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS')) * 86400)*1000;
:new.U_DATE:=round((cast(sys_extract_utc(current_timestamp) as date) - TO_DATE('1970-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS')) * 86400)*1000;
END;
From my understanding, they are just getting the current timestamp value as epoch format and convert it to UTC, and assign it to C_DATE and U_DATE column.
From information schema:
Trigger Type: BEFORE EACH ROW
Trigger Event: INSERT
Is it correct? And are they inserting this epoch value to the same table on C_DATE and U_DATE columns?