-
Notifications
You must be signed in to change notification settings - Fork 149
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
JavaDateTime parsers offset issue #694
Comments
@sirocchj Hi, Julien! Thanks for the feedback! I've proposed a PR with a fix for missing Currently, zio-json supports only those formats that are supported by Main tests for them are in As a workaround you can use a custom codec with a different format:
|
Thanks for the quick turnaround! Yes I have been doing that workaround, I'm hoping we could do better than Java on this one :) (unless ofc the spec is not correct) |
Hi,
according to ISO 8601 Time offset from UTC offsets should be expressible, for example, as "+03", "+03:00" and "+0300". However, the last case is not handled correctly, at least on the
zio2
branch from which I believe0.3.0[-RCX]
releases are being cut.I verified it for
OffsetDateTime
but it is applicable to other*Offset*
cases too.This way all tests pass (notice how the suite was missing an
&&
as well):However, adding a positive test for the
+0000
case, i.e.:fails with:
The culprit looks to be this check, which seems to be commonly used elsewhere, that expect a
:
to be present to divide between hours and minutes.By the way, ISO 8601 does not seem to allow second offsets but the parser can handle that too.. is this by design?
The text was updated successfully, but these errors were encountered: