Message-ID: From: "AFulgens (@AFulgens)" To: "pgjdbc/pgjdbc" Date: Wed, 11 Feb 2026 07:51:32 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3930: Revert semantic calendar changes introduced with #3837 In-Reply-To: References: List-Id: X-GitHub-Author-Login: AFulgens X-GitHub-Comment-Id: 3882871761 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2026-02-11T07:52:04Z X-GitHub-Issue: 3930 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3930#issuecomment-3882871761 Content-Type: text/plain; charset=utf-8 Let me keep it as simple as possible. **IF** I do `insert into testtable(this_is_a_date) values ('1000-01-01')` (or equivalent for Oracle with `TO_DATE`). **THEN** I expect the following code to print only `true`, and that 7 times. ``` String select = "SELECT * FROM TESTTABLE"; statement = connection.prepareStatement(select); resultSet = statement.executeQuery(); while (resultSet.next()) { java.sql.Date date = resultSet.getDate("this_is_a_date"); String string = resultSet.getString("this_is_a_date").split(" ")[0]; // Oracle returns "1000-01-01 00:00:00" String[] split = string.split("-"); LocalDate ld = resultSet.getObject("this_is_a_date", LocalDate.class); System.out.println(date.equals(java.sql.Date.valueOf(string))); System.out.println(date.equals(java.sql.Date.valueOf(ld))); System.out.println(date.toString().equals(string)); System.out.println(date.toLocalDate().equals(ld)); System.out.println(date.toLocalDate().toString().equals(string)); System.out.println(ld.toString().equals(string)); System.out.println(ld.equals(LocalDate.of(Integer.parseInt(split[0]), Integer.parseInt(split[1]), Integer.parseInt(split[2])))); } ``` **RESULTS** - `com.microsoft.sqlserver:mssql-jdbc:13.3.1.jre11-preview` → 7 × `true` - `com.oracle.database.jdbc:ojdbc17:23.26.1.0.0` → 7 × `true` - `org.postgresql:postgresql:42.7.8` → 7 × `true` - `org.postgresql:postgresql:42.7.9` → 5 × `false` followed by 2 × `true`