Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date filter does not parse ISO-8601 time zone designators correctly #315

Open
SIMULATAN opened this issue Dec 22, 2024 · 2 comments
Open

Comments

@SIMULATAN
Copy link

SIMULATAN commented Dec 22, 2024

The date filter has a few formats attached.
However, a .SSSX format is missing (only ones with a space between the time and time zone), thus ignoring timezones when using ISO-8601 Time zone designators in strings that, rightfully so, lack this space.

In my case, this incorrectly assumes 2024-12-22T18:59:56.925Z to be in local time, even though the Z suffix clearly marks it as UTC.
parsed TemporalAccessor has a null zone

There's formats covering this case here, however, since the space delimited formats do not match, it falls back to the .SSS'Z' format, which results in the DateTimeFormatter parsing the Z literally rather than giving it its correct UTC meaning.

I've created a reproducer (in Kotlin) that shows the difference and the proposed .SSSX format here: https://pl.kotl.in/7HuL8wJMU

@msangel
Copy link
Collaborator

msangel commented Dec 22, 2024

Hello!
This is known problem. Fix for this under development: #314
Proper work with zones is in roadmap there. Still no ETA, but some next release will have it.

@SIMULATAN
Copy link
Author

@msangel I saw the PR, it's great to hear that this issue will actually be covered by it. Thank you for your work there! Looking forward to getting it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants