Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: "Does anybody really know what time it is?"
Hi Jonathan,
> What is a GMT epoch second?
Here's what I plan to do to answer this:
1) Take a vacation to England. 2) Go to Greenwich. 3) Find a Linux box. 4) $ date +%s
1015000988
5) "Meditate" on this while continuing vacation and exploring other time
zones.
Right now the best data that I have on time is...
IT'S FRIDAY!!!!!!!!!
Steve Orr
In Mountain Standard Time... Bozeman, MT
-----Original Message-----
Sent: Thursday, February 28, 2002 8:28 PM
To: Multiple recipients of list ORACLE-L
Importance: High
What is a GMT epoch second? This curious mind wants to know.
I can get UTC time by:
alter session set time_zone='00:00';
select current_timestamp from dual;
But this doesn't get Steve the epoch seconds that he wants.
Oddly enough, with all this new time zone functionality, I don't see any way to easily translate a TIMESTAMP WITH TIMEZONE value from one time zone to another. For example, if I have 2-Feb-2002 10:30:00.00 PM -05:00, how would I go about converting that to Pacific Time (-07:00)? It seems like there ought to be a function to do it for me (NEW_TIME won't work here), but the solution doesn't appear that easy.
Best regards,
Jonathan Gennick
mailto:jonathan_at_gennick.com * 906.387.1698
http://Gennick.com * http://MichiganWaterfalls.com * http://ValleySpur.com
Thursday, February 28, 2002, 5:56:01 PM, you wrote:
OS> I want to get the UTC (Coordinated Universal Time) from the database
without
OS> having to escape to the O/S or write a stored proc. I want to get this
time
OS> in GMT epoch seconds without needing to know what timezone the server is
in.
OS> Can't find any Oracle supplied package for this and I'm appalled.
OS> My current medulla oblongata init.ora setting is clues = 0.
OS> Suggestions?
OS> Steve Orr
OS> Bozeman, MT
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jonathan Gennick INET: jonathan_at_gennick.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Orr, Steve INET: sorr_at_rightnow.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Mar 01 2002 - 10:55:33 CST