| Author |
Timezone getting Oracle date
|
Yan Zhou
Ranch Hand
Joined: Sep 02, 2003
Posts: 136
|
|
Hi, I am using Oracle Thin driver on a table with a DATE column. There are existing rows in the tables, their values are in UTC time zone, which may be different from the internal time zone of Oracle DB. What I wanted to do is to retrieve the date as in UTC time zone (regardless of DB timezone), I am expecting sdf.format() returns the exact time as in DB since it is already UTC. However, in reality, sdf.format() applies the time zone difference for a second time. I wonder whether getTimestamp() returns time stmap using Oracle's internal timezone? What am I missing here? Thanks. Yan
|
 |
Yan Zhou
Ranch Hand
Joined: Sep 02, 2003
Posts: 136
|
|
If I call getTimestamp() on a Oracle DATE column, what timezone info. is in the returned Date object? Date object contains the number of milliseconds since 1970/1/1 GMT, which is the starting point, what is the end point? Say, Date column has 1990/1/1, is the end point 1990/1/1 in Oracle's default time zone? Thanks. Yan
|
 |
 |
|
|
subject: Timezone getting Oracle date
|
|
|