Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Getting GMT Time in Oracle?
In article <8tkqa0$v35$0_at_pita.alt.net>,
"whoever" <fred_at_nowhere.net> wrote:
> Oops I mised you saying you can't use new_time. But, why can't you?
> Don't you know the current time zone of the machine(s) you're on?
Correct. I don't know what time zone the machine will be in, and I don't want to add some complicated way to get it (like adding a table to hold my time zone, or something).
> Also,
> I thought DST was taken care of automatically (could be wrong here,
> though) [...]
> >select to_char(new_time(sysdate,'CST','GMT'),'MON DD YYYY HH24MI')
> > from dual;
I'm not an Oracle expert, but I don't think so. For example, in the above command, if I entered 'CDT', I would get a diferent result. A UNIX-style timezone like "CST6CDT" doesn't work.
I've solved my problem. Really, what I was trying to do was to port some code in Brio's "SQR" Report Writer tool as we move from SYBASE to Oracle. SQR makes it easy to write functions in C, and then call them from SQR. So, I wrote a C-function to provide GMT to my SQR scripts.
Still, if it's not provided by Oracle's SQL, this sounds like a big hole (compared to SYBASE).
-- Dave Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue Oct 31 2000 - 08:35:41 CST
![]() |
![]() |