pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedTimestamp issue from ojdbc5 & ojdbc6
5+ messages / 5 participants
[nested] [flat]
* Timestamp issue from ojdbc5 & ojdbc6
@ 2013-12-05 07:33 pravdas <pdas77@gmail.com>
2013-12-05 16:56 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 5+ messages in thread
From: pravdas @ 2013-12-05 07:33 UTC (permalink / raw)
To: pgsql-jdbc
JVM Timezone details :India Standard TimeAsia/Calcutta019800000
DB Timezone details :Central Standard TimeAmerica/Chicago3600000-21600000
String sql = "select systimestamp as base from dual";
.....
PreparedStatement stmt = con.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
while(rs.next()) {
System.out.println(rs.getTimestamp("base"));
System.out.println(rs.getString("base"));
}
Test-1:
I tested using ojdbc14.jar 10.1.0.3.0 with, it works as expected printing
the db time
Output:
2013-12-05 01:23:57.141583
2013-12-5 1.23.57.141583000 -6:0
Test-2:
I tested using ojdbc5.jar & ojdbc6.jar 11.2.0.3.0 with, getTimestamp print
local time where as getString prints db time.
Output:
2013-12-05 12:57:54.3508
2013-12-05 01:27:54.3508 -6:00
Please suggest what is wrong with Test-2 ojdbc driver version 11.2.0.3.0
where the getTimestamp() prints local time. My application expect the db
time like Test-1 in the getTimestamp().
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Timestamp-issue-from-ojdbc5-ojdbc6-tp5781795.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Timestamp issue from ojdbc5 & ojdbc6
2013-12-05 07:33 Timestamp issue from ojdbc5 & ojdbc6 pravdas <pdas77@gmail.com>
@ 2013-12-05 16:56 ` Dave Cramer <pg@fastcrypt.com>
2013-12-05 17:00 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Sehrope Sarkuni <sehrope@jackdb.com>
2013-12-06 21:25 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Scott Carr <kscarr73@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Dave Cramer @ 2013-12-05 16:56 UTC (permalink / raw)
To: pravdas <pdas77@gmail.com>; +Cc: pgsql-jdbc
What is an ojdbc14 jar ?
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On Thu, Dec 5, 2013 at 2:33 AM, pravdas <pdas77@gmail.com> wrote:
> JVM Timezone details :India Standard TimeAsia/Calcutta019800000
> DB Timezone details :Central Standard TimeAmerica/Chicago3600000-21600000
>
> String sql = "select systimestamp as base from dual";
> .....
> PreparedStatement stmt = con.prepareStatement(sql);
> ResultSet rs = stmt.executeQuery();
> while(rs.next()) {
> System.out.println(rs.getTimestamp("base"));
> System.out.println(rs.getString("base"));
> }
>
> Test-1:
> I tested using ojdbc14.jar 10.1.0.3.0 with, it works as expected printing
> the db time
>
> Output:
> 2013-12-05 01:23:57.141583
> 2013-12-5 1.23.57.141583000 -6:0
>
> Test-2:
> I tested using ojdbc5.jar & ojdbc6.jar 11.2.0.3.0 with, getTimestamp print
> local time where as getString prints db time.
>
> Output:
> 2013-12-05 12:57:54.3508
> 2013-12-05 01:27:54.3508 -6:00
>
> Please suggest what is wrong with Test-2 ojdbc driver version 11.2.0.3.0
> where the getTimestamp() prints local time. My application expect the db
> time like Test-1 in the getTimestamp().
>
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Timestamp-issue-from-ojdbc5-ojdbc6-tp5781795.html
> Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Timestamp issue from ojdbc5 & ojdbc6
2013-12-05 07:33 Timestamp issue from ojdbc5 & ojdbc6 pravdas <pdas77@gmail.com>
2013-12-05 16:56 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Dave Cramer <pg@fastcrypt.com>
@ 2013-12-05 17:00 ` Sehrope Sarkuni <sehrope@jackdb.com>
2013-12-05 17:40 ` Re: Timestamp issue from ojdbc5 & ojdbc6 dmp <danap@ttc-cmc.net>
1 sibling, 1 reply; 5+ messages in thread
From: Sehrope Sarkuni @ 2013-12-05 17:00 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; +Cc: pravdas <pdas77@gmail.com>; pgsql-jdbc
Dave:
The JAR files mentioned are the Oracle JDBC driver.
Pravdas:
This mailing list is for the PostgreSQL JDBC. You need to contact Oracle.
Thanks,
Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | http://www.jackdb.com/ |
@jackdb<https://twitter.com/jackdb;
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Timestamp issue from ojdbc5 & ojdbc6
2013-12-05 07:33 Timestamp issue from ojdbc5 & ojdbc6 pravdas <pdas77@gmail.com>
2013-12-05 16:56 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Dave Cramer <pg@fastcrypt.com>
2013-12-05 17:00 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Sehrope Sarkuni <sehrope@jackdb.com>
@ 2013-12-05 17:40 ` dmp <danap@ttc-cmc.net>
0 siblings, 0 replies; 5+ messages in thread
From: dmp @ 2013-12-05 17:40 UTC (permalink / raw)
To: pgsql-jdbc
And the other clue is, "SELECT systimestamp AS base FROM dual". Dual
is used a generic SELECT with ORACLE. Such as SELECT 1+1.
danap
Sehrope Sarkuni wrote:
> Dave:
> The JAR files mentioned are the Oracle JDBC driver.
>
> Pravdas:
> This mailing list is for the PostgreSQL JDBC. You need to contact Oracle.
>
> Thanks,
> Sehrope Sarkuni
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Timestamp issue from ojdbc5 & ojdbc6
2013-12-05 07:33 Timestamp issue from ojdbc5 & ojdbc6 pravdas <pdas77@gmail.com>
2013-12-05 16:56 ` Re: Timestamp issue from ojdbc5 & ojdbc6 Dave Cramer <pg@fastcrypt.com>
@ 2013-12-06 21:25 ` Scott Carr <kscarr73@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Scott Carr @ 2013-12-06 21:25 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; pravdas <pdas77@gmail.com>; +Cc: pgsql-jdbc
ojdbc14 is a jar from Oracle.
(Hey I actually answered something on the list. ;-)
On 12/05/2013 10:56 AM, Dave Cramer wrote:
> What is an ojdbc14 jar ?
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>
> On Thu, Dec 5, 2013 at 2:33 AM, pravdas <pdas77@gmail.com
> <mailto:pdas77@gmail.com>> wrote:
>
> JVM Timezone details :India Standard TimeAsia/Calcutta019800000
> DB Timezone details :Central Standard
> TimeAmerica/Chicago3600000-21600000
>
> String sql = "select systimestamp as base from dual";
> .....
> PreparedStatement stmt = con.prepareStatement(sql);
> ResultSet rs = stmt.executeQuery();
> while(rs.next()) {
> System.out.println(rs.getTimestamp("base"));
> System.out.println(rs.getString("base"));
> }
>
> Test-1:
> I tested using ojdbc14.jar 10.1.0.3.0 with, it works as expected
> printing
> the db time
>
> Output:
> 2013-12-05 01:23:57.141583
> 2013-12-5 1.23.57.141583000 -6:0
>
> Test-2:
> I tested using ojdbc5.jar & ojdbc6.jar 11.2.0.3.0 with,
> getTimestamp print
> local time where as getString prints db time.
>
> Output:
> 2013-12-05 12:57:54.3508
> 2013-12-05 01:27:54.3508 -6:00
>
> Please suggest what is wrong with Test-2 ojdbc driver version
> 11.2.0.3.0
> where the getTimestamp() prints local time. My application expect
> the db
> time like Test-1 in the getTimestamp().
>
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Timestamp-issue-from-ojdbc5-ojdbc6-tp5781795.html
> Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org
> <mailto:pgsql-jdbc@postgresql.org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2013-12-06 21:25 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-12-05 07:33 Timestamp issue from ojdbc5 & ojdbc6 pravdas <pdas77@gmail.com>
2013-12-05 16:56 ` Dave Cramer <pg@fastcrypt.com>
2013-12-05 17:00 ` Sehrope Sarkuni <sehrope@jackdb.com>
2013-12-05 17:40 ` dmp <danap@ttc-cmc.net>
2013-12-06 21:25 ` Scott Carr <kscarr73@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox