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 -> Universal date/time in Oracle and JDBC

Universal date/time in Oracle and JDBC

From: Kevin Dean <NkOdSePaAnM_at_datadevelopment.com>
Date: Fri, 01 Jun 2001 17:27:45 GMT
Message-ID: <lgQR6.2174$Be4.380794@news3.rdc1.on.home.com>

I am developing an application that has to span multiple time zones. In order to facilitate this, the clock on the database server is set to UTC. The problem I am having is that Oracle or its JDBC driver don't seem to understand this idea of spanning multiple time zones:

  1. I enter a date/time in Eastern Daylight Time as today at 13:30; I would like the database to store it as today at 19:30 (UTC = EDT + 4).
  2. Another application in Central Daylight Time retrieves the record; I would like that application to see the date/time as today at 12:30.

The problem I'm having is that Oracle stores the date/time based on the time zone in which the date was entered; i.e. no matter what machine I go to the JDBC driver returns the date/time as today at 13:30.

Is there any way to tell the JDBC driver that all dates are UTC? I really don't want to have to write wrappers around all my date selects, inserts, and updates. Any help would be greatly appreciated.

--
Remove NOSPAM woven into e-mail address to reply directly.
Received on Fri Jun 01 2001 - 12:27:45 CDT

Original text of this message

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