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: Read GMT dates in Java

Re: Read GMT dates in Java

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 30 Nov 2001 12:25:14 GMT
Message-ID: <KUKN7.4334$726.2317062@news1.sttln1.wa.home.com>


Ahh. The Oracle date/time type only goes to seconds. There is no millisencond component.
Yes, the date/time type does not have a time zone component - it knows nothing about time zones since it doesn't know what time zone it is in. If you are reading the date/time in a direct format - like you can do in OCI - not sure you can do it in Java - then you are misreading it. Seems like a bug in the JDBC driver or architecture. Jim
"Gary Gapinski" <glg_at_apk.net> wrote in message news:3C077637.551E02F6_at_apk.net...
> Jim Kennedy wrote:
> >
> > There aren't any timestamps in Oracle 8i. There is a data/time type and
it
> > does not have a time zone component. One can use sysdate as a
"timestamp"
> > but it is just a date time.
> > Jim
>
> More specifically, I found that the value of an Oracle column of type
> DATE, containing a date-time value relative to UTC, returned as a
> java.sql.Timestamp, had an invalid (shifted) millisecond value unless I
> set the default TimeZone to UTC (e.g.,
> TimeZone.setDefault(TimeZone.getTimeZone("UTC"));) prior to JDBC
> queries.
Received on Fri Nov 30 2001 - 06:25:14 CST

Original text of this message

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