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: 22 Oct 2006 00:57:14 -0700
Message-ID: <1161503834.799428.227460@m73g2000cwd.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 Sun Oct 22 2006 - 02:57:14 CDT

Original text of this message

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