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 -> date subtraction, ok from SQL Developer, not ok from JSP

date subtraction, ok from SQL Developer, not ok from JSP

From: <microtim_at_gmail.com>
Date: 23 Oct 2006 11:27:43 -0700
Message-ID: <1161628062.931598.123010@b28g2000cwb.googlegroups.com>


Hi,

I'd appreciate any insight on this problem. I have a table w/ a column of type timestamp. I want to convert the timestamp to "milliseconds since epoch" as shown in the following SQL.

select
  (CAST(SYS_EXTRACT_UTC(myTable.myTimestamp) AS DATE)

When executed from SQL Developer, it returns the correct value. But when executed from within a JSP, it returns the same value minus 7 hours (the difference in time between Pacific Standard Time and GMT).

I find it bizarre that the same SQL would return a different result depending on where it was executed. I've spent a good amount of time trying to find the cause but I think I've hit a wall. I'm hoping someone could provide some pointers or references. Maybe it's something I'm doing wrong or maybe there's a known issue?

thx,
-Tim Received on Mon Oct 23 2006 - 13:27:43 CDT

Original text of this message

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