Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 28 Jul 2025 12:11:20 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #1325: Additional jsr 310 support In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 3126945608 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 1325 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/1325#issuecomment-3126945608 Content-Type: text/plain; charset=utf-8 >Is providing support for (getting) OffsetDateTime and ZonedDateTime by always interpreting as UTC really valuable? 1) `OffsetDateTime` has been implemented in https://github.com/pgjdbc/pgjdbc/pull/2467, and I believe it is way better that all the `java.util.Date`, `java.sql.Timestamp`, `java.util.Calendar` alternatives. Sure PostgreSQL loses user-provided zone, however, we can't overcome it. 2) Both `OffsetDateTime`, `ZonedDateTime`, and `Instant` represent a moment-in-time, which maps nicely to `timestamptz`. It is quite useful for working with `timestamptz`. Of course, it would be nice if PostgreSQL could store timezone as a text-like region name, however, that feature is not available in the backend yet. If they ever improve `timestamptz` we could revise our `ZonedDateTime` mapping.