dbTalk Databases Forums  

Need a function to return GMT time

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Need a function to return GMT time in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Beginner
 
Posts: n/a

Default Need a function to return GMT time - 11-09-2007 , 01:47 AM






I have four databases located all around the world and I would need a
function which will return GMT time.

Any tips?

Cheers
hh



Reply With Quote
  #2  
Old   
gazzag
 
Posts: n/a

Default Re: Need a function to return GMT time - 11-09-2007 , 05:49 AM






On 9 Nov, 07:47, "Beginner" <begin... (AT) nospam (DOT) com> wrote:
Quote:
I have four databases located all around the world and I would need a
function which will return GMT time.

Any tips?

Cheers
hh
What version of Oracle? What operating system? Are we talking client-
side? Server-side?

In the meantime: http://download.oracle.com/docs/cd/B...b14225/toc.htm

HTH

-g




Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: Need a function to return GMT time - 11-09-2007 , 08:00 AM



Beginner wrote:
Quote:
I have four databases located all around the world and I would need a
function which will return GMT time.

Any tips?

Cheers
hh
www.psoug.org
click on Morgan's Library
click on Built-in Functions just under the Google Search logo.
There are numerous functions that you could use to give you the
integer to perform the calculation.

But why not make it easy an just do the following:
ALTER SYSTEM SET TIME_ZONE = '-0:00';
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #4  
Old   
Mark D Powell
 
Posts: n/a

Default Re: Need a function to return GMT time - 11-09-2007 , 04:47 PM



On Nov 9, 6:49 am, gazzag <gar... (AT) jamms (DOT) org> wrote:
Quote:
On 9 Nov, 07:47, "Beginner" <begin... (AT) nospam (DOT) com> wrote:

I have four databases located all around the world and I would need a
function which will return GMT time.

Any tips?

Cheers
hh

What version of Oracle? What operating system? Are we talking client-
side? Server-side?

In the meantime:http://download.oracle.com/docs/cd/B...b14225/toc.htm

HTH

-g
Beginner, if you are still using date data types instead of timezones
then the following might be of interest:

--
-- Convert between time zones
--
select to_char(sysdate,'YYYYMMDD HH24:MI:SS') as "Eastern Daylight"
,to_char(new_time(sysdate,'EDT','GMT'),'YYYYMMDD HH24:MI:SS')
GMT
from sys.dual
;

As mentioned the Oracle edition and version is always of interest.
The data type of the current data is also important.

HTH -- Mark D Powell --



Reply With Quote
  #5  
Old   
Jerome Vitalis
 
Posts: n/a

Default Re: Need a function to return GMT time - 11-12-2007 , 09:22 AM



DA Morgan wrote:

Quote:
But why not make it easy an just do the following:
ALTER SYSTEM SET TIME_ZONE = '-0:00';
Because it will not work? ;-)
I guess you meant "alter database" but it is not always possible to use it
(e.g. with TIMESTAMP WITH LOCAL TIME ZONE columns.)
-----
échangez opinions et commentaires dans les forums de discussion.
http://www.usenetgratuit.com/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.