pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: anaconda875 (@anaconda875) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3433: Same timestamps, but different values when saved (executeUpdate) to database
Date: Fri, 08 Nov 2024 01:42:51 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
1. For Date:
Given a Date `2024-11-07 15:08:57.379` with TimeZone of `GMT-2`:
`preparedStatement.setTimestamp( 1, timestamp, Calendar.getInstance( TimeZone.getTimeZone( "GMT-2" ) ) );`
Expected: When `executeUpdate` should persist `2024-11-07 13:08:57.379`
Actual: as Expected
2. For OffsetDateTime:
Given an OffsetDatime `2024-11-07 15:08:57.379` with TimeZone of `GMT-2`:
`preparedStatement.setObject( 2, offsetDateTime
.atZoneSameInstant( TimeZone.getTimeZone( "GMT-2" ).toZoneId() )
.toOffsetDateTime(),
SqlTypes.TIMESTAMP_WITH_TIMEZONE );`
Expected: When `executeUpdate` should persist `2024-11-07 13:08:57.379` (same as 1)
Actual: `2024-11-07 15:08:57.379`
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3433: Same timestamps, but different values when saved (executeUpdate) to database
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox