Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfLcm-000641-1i for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Apr 2022 13:04:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfLcj-0001A7-TL for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Apr 2022 13:04:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfLcj-00019y-LI for pgsql-jdbc@lists.postgresql.org; Fri, 15 Apr 2022 13:04:29 +0000 Received: from out-19.smtp.github.com ([192.30.252.202]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfLcf-00005k-NV for pgsql-jdbc@lists.postgresql.org; Fri, 15 Apr 2022 13:04:29 +0000 Received: from github.com (hubbernetes-node-de176e3.va3-iad.github.net [10.48.125.76]) by smtp.github.com (Postfix) with ESMTPA id D78EEE0A4F for ; Fri, 15 Apr 2022 06:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1650027862; bh=nqYIgsXNEhQaD+23M7NG23O8kB+U6O+049+bDk3BXrY=; h=Date:From:To:Subject:From; b=FjSEpjK/H+OLTXhF+mPEKXN96OiWnmG7E8QX2JX83xgghameclvZIlq+VtvuyXzz2 vtMqiixlB9dL1Y6qtKu5EPh/PuXTkb7h/4JuIAIagTeqerunFU+EdhVOM6/caz58+F XcMnSbbeb3K9Lpvqag80rvfDGNH3tIJf4PRcNhM0= Date: Fri, 15 Apr 2022 06:04:22 -0700 From: Uwe Schindler To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] 97d910: More test and fix for issues discovered by #2476 (... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 97d910627183677c41b4b8e4579387a981409025 https://github.com/pgjdbc/pgjdbc/commit/97d910627183677c41b4b8e4579387a981409025 Author: Uwe Schindler 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/Toronto it 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. Instead use a more common timezone * Use ISOChronology in the test to make the BC dates more readable TODO: Use this also in TimestampUtils