Thread: [pgjdbc/pgjdbc] 97d910: More test and fix for issues discovered by #2476 (...

[pgjdbc/pgjdbc] 97d910: More test and fix for issues discovered by #2476 (...

From
Uwe Schindler
Date:
Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 97d910627183677c41b4b8e4579387a981409025
      https://github.com/pgjdbc/pgjdbc/commit/97d910627183677c41b4b8e4579387a981409025
  Author: Uwe Schindler <uwe@thetaphi.de>
  Date:   2022-04-15 (Fri, 15 Apr 2022)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/DateTest.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc42/GetObject310Test.java

  Log Message:
  -----------
  More test and fix for issues discovered by #2476 (#2488)

* This adds some tests for issues discovered by #2476

* Port over DateTest from the other PR. It passes for me on German timezone! I also added timestamp without TZ

* Fix the offset handling in #2467 to restore how it was in previous pgjdbc version.

* Improve test to cycle over all timezones. This shows that for some timezones like Aperica/New_York it fails while
America/Torontoit works. This explains the problems.
 

* Rewrite test and make everything a parameter: type, zoneId, binary=true/false

* The Azores and Niue timezones have some problems in 1950 (e.g., Azores did not exist at that time), so removing them.
Insteaduse a more common timezone
 

* Use ISOChronology in the test to make the BC dates more readable
TODO: Use this also in TimestampUtils