pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: marschall (@marschall) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #1325: Additional jsr 310 support
Date: Thu, 15 Nov 2018 13:55:06 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

@bokken 

> Instant and java.sql.Timestamp (and java.util.Date) are semantically identical data types. They all represent an exact point in time (to varying degrees of precision), with no regard to time zone.

This is unfortunately not sure. java.sql.Timestamp is bound to the JVM default time zone. Let's say you have `2018-11-15T14:48` on the database and your JVM default time zone is +1 you will get a Timestamp and instant for `2018-11-15T14:48+01:00`. If your JVM default time zone is +2 you get a Timestamp and instant for `2018-11-15T14:48+02:00` which is different.

I feel allowing these kinds of conversions will further perpetuate the subtle time zone bugs that people are complaining about with the existing java.sql and java.util.Date APIs.

view thread (25+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #1325: Additional jsr 310 support
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox