Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp2uU-0003EZ-Bt for pgsql-jdbc@arkaria.postgresql.org; Fri, 06 Dec 2013 21:26:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vp2uT-0004f7-Rl for pgsql-jdbc@arkaria.postgresql.org; Fri, 06 Dec 2013 21:26:05 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp2uT-0004ez-0l for pgsql-jdbc@postgresql.org; Fri, 06 Dec 2013 21:26:05 +0000 Received: from mail-yh0-x22a.google.com ([2607:f8b0:4002:c01::22a]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp2uP-0007Pu-RW for pgsql-jdbc@postgresql.org; Fri, 06 Dec 2013 21:26:04 +0000 Received: by mail-yh0-f42.google.com with SMTP id z6so956518yhz.29 for ; Fri, 06 Dec 2013 13:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=RGc4zGhP8Yog+3Ik7bM77Y3z5suu1VkvchY/LMB0rOI=; b=pQa8gmK8NuZqt4qwKDGXMAH8K+E419WO626H29FSu1tmwcfWyIOawHmhLcuhKE5wzF BM8sj3VcMD3dkxyvT5aaQMiGz8sU4CZ+c3l4IUM7OTt/537vOsTUV0Bl8ecTtfPldZyv MgvEkteBQdf8gm9nNVBJJW6L18CCU7i1zmxbowy8J4SUg5uiShF05TCjPlaEId8uYfbM 2JI5Ohdx50AchPh5BW2/JQTIw6duduJ34twGo00Q2fddbLrH4nHloqT+ONT6ejqjAEBM nKvHoI00RQrWYq4KK918k92cd7lPSszzBzq3FDE/VtcN5NoOBA3jP2V3t1eQvT4z2HuP i7dw== X-Received: by 10.236.54.38 with SMTP id h26mr1080yhc.160.1386365160139; Fri, 06 Dec 2013 13:26:00 -0800 (PST) Received: from [10.42.0.82] (96-33-248-246.static.kgpt.tn.charter.com. [96.33.248.246]) by mx.google.com with ESMTPSA id q9sm23938113yhk.16.2013.12.06.13.25.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Dec 2013 13:25:59 -0800 (PST) Message-ID: <52A240E6.8000409@gmail.com> Date: Fri, 06 Dec 2013 15:25:58 -0600 From: Scott Carr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Dave Cramer , pravdas CC: List Subject: Re: Timestamp issue from ojdbc5 & ojdbc6 References: <1386228826869-5781795.post@n5.nabble.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080001020406090901050604" X-Pg-Spam-Score: 0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------080001020406090901050604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 > 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 > > --------------080001020406090901050604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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> 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


--------------080001020406090901050604--