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

Home -> Community -> Usenet -> c.d.o.misc -> Help !!!! Problems of converting EST time and GMT time in Oracle8 !!!

Help !!!! Problems of converting EST time and GMT time in Oracle8 !!!

From: Kevin LEE <klee_at_aba.net.au>
Date: Wed, 08 Sep 1999 12:28:44 +1000
Message-ID: <37D5C9DB.9C757E42@aba.net.au>


Hi All:

    I am having problem of converting the time in local time into gmt time and store the gmt time in the database. I have played around the following to test out the conversion was done probably:

In sqlplus, the following command was executed

SQL> select TO_CHAR(sysdate, 'DD-MM-YYYY HH24:MI:SS') from dual;

TO_CHAR(SYSDATE,'DD



08-09-1999 12:16:22

In my local term (a linux base platform), I use the date command to check the system time.
The system time is recorded as follow:

Wed Sep 8 12:17:57 EST 1999

Result, I confirm that the sysdate function does in sync with my local system time which is EST.

Back the sqlplus, I execute to the following command to convert from EST to GMT :

SQL> select TO_CHAR(new_time(sysdate, 'EST', 'GMT'), 'DD-MM-YYYY HH24:MI:SS') from dual;

TO_CHAR(NEW_TIME(SY



08-09-1999 17:25:33

Again, I check my local system in UTC (which is the same as GMT), it gives the following result:

Wed Sep 8 02:26:08 UTC 1999

The GMT time obtained from the sqlplus was around forwards to my local system time which was incorrect. The correct GMT should around 10 hours backwards to my local zone time as (because I am in Melbourne Australia) indicated from my xterm.

It seems to me that the GMT time obtained from sqlplus was respected to the US time zone.

Is any body know how to fix my problem !!!!!

--
Kevin LEE
Software Engineer

http://www.aba.net.au

Australian Business Access Pty Ltd
Level 2, 33 Lincoln Square South
Carlton, Victoria 3053
phone +61-3-8341-2400
fax +61-3-8341-2499 Received on Tue Sep 07 1999 - 21:28:44 CDT

Original text of this message

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