Skip to content

doc: clarify that OffsetDateTime return UTC time zone as the backend does not store time zone - #3944

Open
vlsi wants to merge 1 commit into
pgjdbc:masterfrom
vlsi:tz_docs
Open

doc: clarify that OffsetDateTime return UTC time zone as the backend does not store time zone#3944
vlsi wants to merge 1 commit into
pgjdbc:masterfrom
vlsi:tz_docs

Conversation

@vlsi

@vlsi vlsi commented Feb 23, 2026

Copy link
Copy Markdown
Member

Clarifies #3943

Note: OffsetDateTime UTC behavior is discussed in #1324.

@davecramer

Copy link
Copy Markdown
Member

While the backend does not store the TZ. The timestamp does come back with a TZ if you use timestamptz?

@vlsi

vlsi commented Feb 23, 2026

Copy link
Copy Markdown
Member Author

The timestamp does come back with a TZ if you use timestamptz

I don't get the question.


Well, the backend does send the timezone when using text protocol, and it is discussed in #1324.

@davecramer

Copy link
Copy Markdown
Member

Ah, Ok, so we have an issue when using binary. I think for all other timestamps we just assume the client's timezone, no ?

@vlsi

vlsi commented Feb 23, 2026

Copy link
Copy Markdown
Member Author

Well, java.sql types do not have explicit timezone, so we have to convert the value as if it was in "the client's default timezone".
With OffsetDateTime we somehow decided to force UTC, and it causes inconsistency like in #1324.
I think we can use connection timezone when decoding OffsetDateTime, and we can convert UTC binary value into the client's time zone. However, if we ever do so, we should better discuss it in #1324.

This PR just adds extra clarification on the current behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants