Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: "Does anybody really know what time it is?"
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). Received on Thu Feb 28 2002 - 21:28:22 CST
![]() |
![]() |