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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to get timezone in 9i

Re: How to get timezone in 9i

From: Ramesh FL <karai.ramesh_at_gmail.com>
Date: Mon, 21 Feb 2005 16:04:21 -0800
Message-ID: <a0fb3937050221160472d38278@mail.gmail.com>


On Fri, 18 Feb 2005 16:42:34 +0100, Christian Antognini <Christian.Antognini_at_trivadis.com> wrote:
> >I need to get international time zones in 3 letter format, something
> >like EST,CDT ....etc.
>
> ALTER DATABASE SET TIME_ZONE =3D 'EST';
>
> Then when you select DBTIMEZONE you get the correct format.
>
> Notice that you cannot alter the database if it stores tables with =
> TIMESTAMP WITH LOCAL TIME ZONE columns.
> --


Hi,

I am using Oracle 9.2 on Win2k Pro. Here is a cut and paste of SQL PLus:



11:43:19 SQL> sho user
USER is "SYS"
11:43:22 SQL>
11:43:25 SQL> select dbtimezone from dual; more...

DBTIME



-07:00

Elapsed: 00:00:00.04
11:43:32 SQL> select sessiontimezone from dual; more...

SESSIONTIMEZONE



-08:00

Elapsed: 00:00:00.03
11:43:40 SQL>
11:43:41 SQL> ALTER DATABASE SET TIME_ZONE ='EST'; ALTER DATABASE SET TIME_ZONE ='EST'
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE

Elapsed: 00:00:00.01


  1. What is the difference between session time zone and db time zone and why is there an hour diference. Also, I am in Eastern Time (which is 5 hrs behind GMT). Why do I get -7:00 and -8:00 ?
  2. ALTER DATABASE SET TIME_ZONE, does not seem to work.

Thanks.

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 21 2005 - 19:07:24 CST

Original text of this message

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