Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAmPp-008BBL-Sr for pgsql-jdbc-commits@arkaria.postgresql.org; Wed, 06 Dec 2023 07:33:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rAmPo-008B7F-9h for pgsql-jdbc-commits@arkaria.postgresql.org; Wed, 06 Dec 2023 07:33:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAmMt-008ATe-6q for pgsql-jdbc-commits@lists.postgresql.org; Wed, 06 Dec 2023 07:30:51 +0000 Received: from out-25.smtp.github.com ([192.30.252.208]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAmMp-0092jI-Gl for pgsql-jdbc-commits@lists.postgresql.org; Wed, 06 Dec 2023 07:30:49 +0000 Received: from github.com (hubbernetes-node-c62fd0f.ash1-iad.github.net [10.56.163.29]) by smtp.github.com (Postfix) with ESMTPA id 4133A340744 for ; Tue, 5 Dec 2023 23:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2023; t=1701847846; bh=rRctk6pQjTlSk3m7SYQ3Kfnw+FIGL45IGgHzSNBz26E=; h=Date:From:To:Subject:From; b=IioNXd9VOSkiPaUcpOMVDrQM1cbTJ88/azBUoA2xrb8ZznXy4UTtQsZbUQk93hs0L t2tE24k7uSmaKeC9pMJbSJlSiU0P5PIG6e+fOsNVGY9GFAlN21vmtVZd2PGRJM47gx COJVMhL3o77fVf0Rg0xrdrCAxTTKX7ek/ZVJNPq4= Date: Tue, 05 Dec 2023 23:30:46 -0800 From: Vladimir Sitnikov To: pgsql-jdbc-commits@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] c1a851: fix: avoid timezone conversions when sending Local... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc-commits@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: c1a851c02b8690cda8e7b11a594f73ed27aa3189 https://github.com/pgjdbc/pgjdbc/commit/c1a851c02b8690cda8e7b11a594f73ed27aa3189 Author: Vladimir Sitnikov Date: 2023-12-06 (Wed, 06 Dec 2023) 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/SetObject310Test.java Log Message: ----------- fix: avoid timezone conversions when sending LocalDateTime to the database Previously, LocalDateTime was converted to OffsetDateTime using the default timezone, which made certain values unrepresentable. For instance, 2023-03-12T02:00 in America/New_York is hard to represent as it undergoes DST change. It does not change resultSet.getObject(int | string), and resultSet.getString(int | string) and those methods would still have issues when accessing timestamps like 2023-03-12T02:00 when the client time zone is America/New_York Co-authored-by: Kevin Wooten Fixes https://github.com/pgjdbc/pgjdbc/issues/1390 Fixes https://github.com/pgjdbc/pgjdbc/issues/2850 Closes https://github.com/pgjdbc/pgjdbc/pull/1391