[FLINK-39995][json] Add ISO-8601 timestamp format with explicit timezone offset support#28546
Open
ddebowczyk92 wants to merge 2 commits into
Open
[FLINK-39995][json] Add ISO-8601 timestamp format with explicit timezone offset support#28546ddebowczyk92 wants to merge 2 commits into
ddebowczyk92 wants to merge 2 commits into
Conversation
Collaborator
24e3845 to
f5b83f2
Compare
…one offset support
f5b83f2 to
ce32d20
Compare
|
The new format parses explicit offsets, but serialization currently emits the resulting instant with |
Contributor
Author
|
@hiSandog, thanks for taking a look. I've updated the tests and documentation so everything should be clear for the users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
The current
ISO-8601timestamp format option forJSONis misleading as it does not support timestamps with explicit timezone offsets (e.g.,2026-06-25T09:15:00+00:00).The existing
ISO-8601format only handles timestamps with UTC 'Z' suffix:yyyy-MM-ddTHH:mm:ss.s{precision}ZIt cannot parse valid
ISO-8601timestamps with explicit timezone offsets like+02:00,-05:00, etc.This change adds a new timestamp format option
ISO-8601-WITH-OFFSETthat properlyhandles timestamps with explicit timezone offsets in the format:
yyyy-MM-ddTHH:mm:ss.s{precision}±HH:mmBrief change log
TimestampFormat.ISO_8601_WITH_OFFSETenum valueISO8601_TIMESTAMP_WITH_OFFSET_FORMATDateTimeFormatterISO-8601-WITH-OFFSETVerifying this change
Added unit tests covering various offset formats and precisions
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?