Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Read GMT dates in Java
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
![]() |
![]() |