Finally fixed the unknown modules error, fixing the function 'UNIX_TIMESTAMP', which now returns the UTC utimestamp

This commit is contained in:
Alejandro Gallardo Escobar 2015-05-19 18:58:29 +02:00
parent 60c486c62f
commit cfa52a655b
1 changed files with 1 additions and 2 deletions

View File

@ -23,8 +23,7 @@
-- Pandora schema creation script -- Pandora schema creation script
-- Triggers must end with two semicolons because Pandora installer need it -- Triggers must end with two semicolons because Pandora installer need it
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP (oracletime IN DATE DEFAULT NULL ) RETURN INTEGER AS utcdate DATE; unixtime INTEGER; BEGIN IF (oracletime IS NULL) THEN utcdate := SYS_EXTRACT_UTC(SYSTIMESTAMP); ELSE utcdate := oracletime; END IF; unixtime := (utcdate - to_date('19700101','YYYYMMDD')) * 86400; RETURN unixtime; END;;
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP (oracletime IN DATE DEFAULT SYSDATE) RETURN INTEGER AS unixtime INTEGER; BEGIN unixtime := (oracletime - to_date('19700101','YYYYMMDD')) * 86400; RETURN unixtime; END;;
CREATE OR REPLACE FUNCTION NOW RETURN TIMESTAMP AS t_now TIMESTAMP; BEGIN SELECT LOCALTIMESTAMP INTO t_now FROM dual; RETURN t_now; END;; CREATE OR REPLACE FUNCTION NOW RETURN TIMESTAMP AS t_now TIMESTAMP; BEGIN SELECT LOCALTIMESTAMP INTO t_now FROM dual; RETURN t_now; END;;
-- Procedure for retrieve PK information after an insert statement -- Procedure for retrieve PK information after an insert statement