Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL "localtime" function

PL/SQL "localtime" function

From: Rick Osterberg <osterber_at_fas.harvard.edu>
Date: 10 Jul 1999 23:37:17 GMT
Message-ID: <7m8lfd$q8c$1@news.fas.harvard.edu>


For reasons best left unexplained, I have a bunch of Oracle (8.0.5) tables that have "date/time" fields that are NUMBER(x), and are stored as Unix "epoch" times instead of native Oracle times. I'd eventually like to migrate everything to Oracle date/time format, but that will take some careful work, because of dependencies, etc.

In the meantime, I'd like to be able to convert between Unix and Oracle times. So I'm looking for a PL/SQL function that can do this for me. Any ideas? What seems to be a bit of a holdup is that Oracle server appears not to have any idea what time zone it's in, wheras Unix servers do, and figure out daylight savings, etc. This seems to be a particularly thorny item to deal with.

Anyone have any handy PL/SQL code segments lying around to do this?

-Rick

--
+--------------------------------------------------------------------------+

|                 Rick Osterberg   osterber_at_fas.harvard.edu                |

+--------------------------------------------------------------------------+
Received on Sat Jul 10 1999 - 18:37:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US