2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

12
vdh/timezone_convert.sql Normal file
View File

@@ -0,0 +1,12 @@
create or replace function timezone_convert (UnixTimeA in number,UnixTimeZoneA in varchar2) return Date
is
JulDate date := to_date('01-JAN-1970 00:00:00','DD-MON-YYYY HH24:MI:SS');
LocalTimeZone varchar(6);
begin
select dbtimezone into LocalTimeZone from dual ;
return CAST(FROM_TZ(CAST(JulDate+(UnixTimeA/86400) AS TIMESTAMP), UnixTimeZoneA) AT TIME ZONE LocalTimeZone AS DATE);
exception
when OTHERS then raise_application_error(-20015,'Error in timezone_convert',true);
end;
/
sho errors function timezone_convert