pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: stan@marencik.cz
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16060: JDBC - badly gets DateOffsetTime value from database
Date: Wed, 16 Oct 2019 13:20:27 +0900
Message-ID: <20191016042027.GC2602@paquier.xyz> (raw)
In-Reply-To: <16060-de59c53943ddc082@postgresql.org>
References: <16060-de59c53943ddc082@postgresql.org>
On Tue, Oct 15, 2019 at 06:52:12PM +0000, PG Bug reporting form wrote:
> Java DateOffsetTime value correctly stored to database to timestamptz. I see
> right conversion to string including right time zone.
> Opposite process doesn't get the right DateOffsetTime value from database.
> In my case the string representation stored to database is 2019-10-15
> 20:26:41.391055+02 but I get 2019-10-15T18:26:41.391055Z which doesn't by +2
> hours which is my time zone.
> I think the bug is in TimestampUtils line 513:
> // Postgres is always UTC
> OffsetDateTime result = OffsetDateTime.of(ts.year, ts.month, ts.day,
> ts.hour, ts.minute, ts.second, ts.nanos, zoneOffset)
> .withOffsetSameInstant(ZoneOffset.UTC);
> The last line ".withOffsetSameInstant(ZoneOffset.UTC);" is the bug
As an issue for the Postgres JDBC driver, I think that you should
either contact pgsql-bugs:
https://www.postgresql.org/list/pgsql-jdbc/
Or raise an issue where the project is located:
https://github.com/pgjdbc/pgjdbc
Thanks,
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
view thread (4+ messages) latest in thread
Message-ID: <20191016042027.GC2602@paquier.xyz> Permalink: ../20191016042027.GC2602@paquier.xyz/ Also on: postgresql.org/message-id/20191016042027.GC2602@paquier.xyz ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: michael@paquier.xyz, stan@marencik.cz Subject: Re: BUG #16060: JDBC - badly gets DateOffsetTime value from database In-Reply-To: <20191016042027.GC2602@paquier.xyz> References: <16060-de59c53943ddc082@postgresql.org> <20191016042027.GC2602@paquier.xyz> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
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