From: Philippe Marschall <pm@netcetera.ch>
To: pgsql-jdbc@lists.postgresql.org
Subject: Re: TimestampUtils.toJavaSecs / toPgSecs seem dubious
Date: Fri, 2 Aug 2019 09:16:03 +0200
Message-ID: <58b6cc1f-26ba-9689-86bd-e63134c95418@netcetera.com> (raw)
In-Reply-To: <5D3AF944.6020900@anastigmatix.net>
References: <5D3AF944.6020900@anastigmatix.net>
On 26.07.19 14:59, Chapman Flack wrote:
> pgJDBC's toJavaSecs() and toPgSecs() methods contain some dubious
> adjustments, apparently there in an attempt to make the java.sql
> mapping less weird. But it really succeeds only in smearing the weird
> around so it's not where it belongs, and some even gets on the java.time
> mapping, which ought to be free of weird.
So, I had a look at this. I can only reproduce it with the binary
protocol, not with the text protocol. So as a short term work around
switching to the text protocol should work.
java.time inherits the weird because it also goes through toJavaSecs. I
am working on a patch but it needs more tests and polish. I hope I'll be
able to submit a bug and PR shortly.
Cheers
Philippe
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-jdbc@postgresql.org
Cc: pm@netcetera.ch
Subject: Re: TimestampUtils.toJavaSecs / toPgSecs seem dubious
In-Reply-To: <58b6cc1f-26ba-9689-86bd-e63134c95418@netcetera.com>
References: <5D3AF944.6020900@anastigmatix.net> <58b6cc1f-26ba-9689-86bd-e63134c95418@netcetera.com>
* 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