RE: get UTC date in Oracle 7.3.4

  • From: Andreas.Haunschmidt@xxxxxxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 10 Mar 2004 19:14:00 +0100

Thanks Kevin!

Your example works, but:

I tried ( on 9.2, since I have no access to the 7.3.4 instance;
my collegue still has to try it on 7.3.4, but I suppose the same error will
happen ):

  select to_char(new_time(sysdate,'CEST','GMT'),'YYYY-MM-DD-HH24.MI.SS')
from dual
                                *
  ERROR at line 1:
  ORA-01857: not a valid time zone

The problem is, new_time accepts only a few timezones,
but unfortunately we have Central European Time here in Austria,
additionally the daylight saving madness time switch happens here too.

But maybe I can use one of the supported timezones (with daylight saving
time), 
apply an offset in order to get our timezone and use new_time then. 

I still have to figure out, if the "switching days" of the valid timezones
for new_time
are the same as in the European Union...

<CHAGRIN>
  Getting UTC Time in Oracle is still a mess, even in 9.2 there is no built
in function
  a la UTCSYSDATE...
</CHAGRIN>

Andreas

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Kevin Lange
Sent: Wednesday, March 10, 2004 6:38 PM
To: 'oracle-l@xxxxxxxxxxxxx'
Subject: RE: get UTC date in Oracle 7.3.4


How about the NEW_TIME function .  Such as :

select to_char(new_time(sysdate,'CST','GMT'),'YYYY-MM-DD-HH24.MI.SS') from
dual



-----Original Message-----
From: Andreas.Haunschmidt@xxxxxxxxxxxxxxx
[mailto:Andreas.Haunschmidt@xxxxxxxxxxxxxxx]
Sent: Wednesday, March 10, 2004 11:26 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: get UTC date in Oracle 7.3.4


Dear List Members!

A collegue running Oracle 7.3.4 needs to get the SYSDATE in UTC (GMT),
as far as I know, there is no trivial solution to get this done
in SQL or PL/SQL only. 
We would be grateful, if anyone had a solution...
Any ideas?

Thanks in advance

Andreas 
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: