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

Home -> Community -> Usenet -> c.d.o.server -> Re: Extracting current time zone

Re: Extracting current time zone

From: Doug Cowles <dcowles_at_us.ibm.com>
Date: Mon, 07 Feb 2000 11:45:46 -0500
Message-ID: <389EF6BA.402FA2BA@us.ibm.com>


A little help? I tried going through standard.sql and came across this - function current_time return "TIME WITH TIME ZONE"; and tried it like this -
declare
syz varchar2(60);
begin
syz:=standard.current_time();
dbms_output.put_line(syz);
end;
/
04:38:50.448887000 PM +00.00

I ran this at about 11:38am EST. It almost looks like the first six digits are what time it is in Greenwich. I'm not sure what the other number is and I don't see "EST" like I was hoping... Can anyone shed some more light on this feature?

Jonathan Lewis wrote:

> I don't think you'll find it in any documentation
> yet, but Oracle 8.1.5 has implemented time,
> timestamp, time with timezone, timestamp
> with timezone data types which may be used
> in PL/SQL.
>
> Read through the standard.sql in
> $ORACLE_HOME/rdbms/admin for
> more details.
>
> One nice touch - there is now a
> CURRENT_DATE call in PL/SQL
> which bypasses the normal
> 'select from dual' that you get from
> using SYSDATE. However it is
> DATE only, not datetime.
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Doug Cowles wrote in message <3895C742.14CD04C4_at_us.ibm.com>...
> >Our operating system (AIX 4.2.3) maintains the current time zone and it
> >is visible with
> >the date command from a shell. Currently it is EST. When daylight
> >savings time comes around, it will be EDT. We have a very time
> >sensitive app with some NEW_TIME
> >funtions and would need to make comparisons between areas that may or
> >may not be
> >on daylight savings time. It would be nice if there was any way to
> >pull the current time
> >zone (of the server Oracle is sitting on) through Oracle in order to
> >become a variable in a NEW_TIME function. However, I see nothing in
> >Oracle documentation that allows you to extract the time zone on the
> >server into Oracle. If Oracle had knowledge of daylight savings time
> >switches that would be very useful as well. Any thoughts?
> >
Received on Mon Feb 07 2000 - 10:45:46 CST

Original text of this message

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