Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKanx-0006Yr-O6 for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Oct 2019 04:20:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKanw-0005Wj-Al for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Oct 2019 04:20:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKanw-0005WY-2b for pgsql-bugs@lists.postgresql.org; Wed, 16 Oct 2019 04:20:56 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKant-0004AK-3T for pgsql-bugs@lists.postgresql.org; Wed, 16 Oct 2019 04:20:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E5A80213BD; Wed, 16 Oct 2019 00:20:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 16 Oct 2019 00:20:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=JB6sQmFfqmHJvdquxrlwiruuS8J 1l9Gb+ScTs91iJEc=; b=Eh7InS3i9Xxs3oVyP5MflV5kxVT4pdCcyyoIU+8yBGe JZBFWrX/kGkqshPkcoGOU20HFGBcYoNQ8vTmDiWQeoKTqJOwHRulkaFlaKfc7GYD 3XMt12Cyl6cCuTn7hbfxStahppoAqLPjUI6rf+aBLL3p8JaXZef5n7QuYGGC1QzA Lr0+OUuUaLE4yzOq2I/rnwo973XHAnXwmV13kWfycQM+f0V3uhe7HW3mFKqKkLyQ CgLcRb271ohrutnKM8WCEBKeBbDvU9InnAKcdyksg1YzCLUE+DjXq3i7Nesti3IN HWXFOwiglHwU+YXyLV+Uwfv5RYXHvmmIqFUX8t7E75A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JB6sQm FfqmHJvdquxrlwiruuS8J1l9Gb+ScTs91iJEc=; b=HPkJ5E7e+0wZGlFNWbS6EN GjmYch0fXeTynjpbZ/JDAl+LCdnrrQ72FdGvioqVKFWFsGSSSxPBWKKyDb4gAIAn bVpve0pDiUDPRzci/zgCzf60YyafZDD8x8JbFk/NOFRTmj1cX34uagLWmpTZZpuz L/DSKNIlUcj5PB7feeUVzhQJNznALrWAp3fP0ffgEve4aONdIsEVoXEoFvmvawfY S+LGHkyRYuNpJhGV14QrjYpJxRIM197W7hNUtJypigxuVgX4Dj0LK2KWxh5kAncj +MOBLtukGGQG+vWVddtJNNo+llrICoJMAxueohWxL8vCivoKmbKb8V0wI/A03JYQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjeeggdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddvfedmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuffhomhgrihhnpehpoh hsthhgrhgvshhqlhdrohhrghdpghhithhhuhgsrdgtohhmnecukfhppeduudekrddvgedu rddvgeelrddvudenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqh huihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (mp76f1f915.ap.nuro.jp [118.241.249.21]) by mail.messagingengine.com (Postfix) with ESMTPA id 7592980059; Wed, 16 Oct 2019 00:20:30 -0400 (EDT) Date: Wed, 16 Oct 2019 13:20:27 +0900 From: Michael Paquier To: stan@marencik.cz, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16060: JDBC - badly gets DateOffsetTime value from database Message-ID: <20191016042027.GC2602@paquier.xyz> References: <16060-de59c53943ddc082@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lMM8JwqTlfDpEaS6" Content-Disposition: inline In-Reply-To: <16060-de59c53943ddc082@postgresql.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --lMM8JwqTlfDpEaS6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --lMM8JwqTlfDpEaS6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl2mmosACgkQnvQgOdby QH1RUw//R3gJLEel8mbnn3iI56/FJ6St0G+dq7yvhkfsxWkyfz0w0AbM9KbSZS4d 774O6xMJ2fPH6IWJ3rXC7SSX3F0raQExl3ORAXgPZmx3Jw1Mhy6Coex5fxvwo4iX XyFrPcgByNVvdC3imptNJgojc2hh7dSqGqcLAoG5oITYC1Cp2HNE9olpKOqKKOLN v549c++b+jOI8CqnquPpoK/jrn9UQEZOClKud/Mu8yG9bFMQg99yTbePEeWqdpQn 3f9GDS/7Nbutdtblne7lWQWuYCnVtm3fC+eu1ITGpksAukVVIybT68JU6feRyv1J qyFEhiVYiO60rDku4B8g0kWdW6ZCieADwLfRTwVuwtGKae5HR/uXVp3YSpz25wNN e/c00fbMG0+K/qajmifu1snMGEbV6jVG7Mlpuu4+aFxn7D+VLM+VDzAXfVTpsb9Z O6Vb1jVnDmJwgVQxt25kGyovlqPSpnXOFDv9DVgF6qLhvVXU+nL3XJoTrhUOmilk /apZ/DnG3xQGJQJe0PyHkEc6IDGGeDdB6Eqhm2v8Zv2q4rZyL6zZUyidAdCy11u9 ytn1bUKGFz6yf2TyIiCozXA62Xx8dZCp2Wuu89Abst/ccQcYbe6jNvwYv0oBomMb h0aG3N6zNhiy7PY0tx0Pw6wr4D2rOKgHCVhU4pHtRJJmGgwkycc= =ZeG/ -----END PGP SIGNATURE----- --lMM8JwqTlfDpEaS6--