to_char(sysdate-(1/24),'Dy, DD Mon YYYY hh24:mi:ss','NLS_DATE_LANGUAGE=AMERICAN')||' GMT'
Beware that I've to take one hour off, because I'm in Spain, GMT+1, if you are in a different time zone you only have to add or substract the difference between GMT and your time zone.
I hope you will enjoy.
tt
ResponderEliminari que oo passa amb l'horari d'estiu?
ksum l'ou, ja em veig tocant l'ed_get ;-)
c'est moi aussi
ResponderEliminare voila
function dateUTC(data date) return date as
v_data date;
begin
if substr(dbtimezone,1,1)='+' then
return sysdate-to_number(substr(dbtimezone,2,2))/24;
else
return sysdate+to_number(substr(dbtimezone,2,2))/24;
end if;
end dateUTC;
function toRFC822(data date) return varchar2 as
begin
if substr(dbtimezone,1,1)='+' then
return to_char( sysdate-to_number(substr(dbtimezone,2,2))/24,'Dy, DD Mon YYYY HH24:MI:SS','NLS_DATE_LANGUAGE=AMERICAN')||' GMT';
else
return to_char( sysdate+to_number(substr(dbtimezone,2,2))/24,'Dy, DD Mon YYYY HH24:MI:SS','NLS_DATE_LANGUAGE=AMERICAN')||' GMT';
end if;
end toRFC822;