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 1nPe8Z-0006Kt-P4 for pgsql-jdbc@arkaria.postgresql.org; Thu, 03 Mar 2022 05:36:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nPe8Y-0004EE-4e for pgsql-jdbc@arkaria.postgresql.org; Thu, 03 Mar 2022 05:36:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nPe8X-0004E4-RR for pgsql-jdbc@lists.postgresql.org; Thu, 03 Mar 2022 05:36:25 +0000 Received: from out-18.smtp.github.com ([192.30.252.201] helo=smtp.github.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nPe8V-0007b8-64 for pgsql-jdbc@lists.postgresql.org; Thu, 03 Mar 2022 05:36:24 +0000 Received: from github.com (hubbernetes-node-c6edaa1.va3-iad.github.net [10.48.221.27]) by smtp.github.com (Postfix) with ESMTPA id 9157B3403FB for ; Wed, 2 Mar 2022 21:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1646285781; bh=7lpYDt8mOFq+Nt1nEeRxI5E7Ff2oN5WQpjcoUmxIx2o=; h=Date:From:To:Subject:From; b=pQ5KdleJOoCM0L/b4abwwBy1LTk0A4qjsW56MXiiAPGWnBuQd25aZXsaebzXnLc5e UXdZ6oeiNadMwOgYNW4pzSYf6rkEYwq1kz5LFv5GRJc1ZvlfXzWPdLY3ubYqNmmOJz gdrIedjT9bJ5p6axJNLclfgFUphh0cgNlEsuU3nk= Date: Wed, 02 Mar 2022 21:36:21 -0800 From: Uwe Schindler To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] c02aa7: feat: use direct wire format -> LocalDate conversi... 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: c02aa7725a3c5c71314e0e8c441a72fc97ff83a0 https://github.com/pgjdbc/pgjdbc/commit/c02aa7725a3c5c71314e0e8c441a72fc97ff83a0 Author: Uwe Schindler Date: 2022-03-03 (Thu, 03 Mar 2022) Changed paths: M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java M pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java M pgjdbc/src/test/java/org/postgresql/test/jdbc42/GetObject310Test.java Log Message: ----------- feat: use direct wire format -> LocalDate conversion without resorting to java.util.Date, java.util.Calendar, and default timezones Both text and binary formats for date and timestamp contain all the information that is needed to instantialte LocalDate. There's no need to roundtrip with Date and timezones. Converting database results into LocalDate directly reduces the number of moving parts and it makes the code easier to follow. fixes #2221