Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> date subtraction, ok from SQL Developer, not ok from JSP
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
![]() |
![]() |