You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this piece of code to handle a Long date (20241016153100) to an ISO8106 date, it works for most of the cases, but if tz is UTC, the id will be Z, and throw an exception.
Errors: position 15: 'Expected timeZoneId but got ', position 0: 'Expected - but got 2', position 0: 'Expected + but got 2'kotlinx.datetime.DateTimeFormatException: Failed to parse value from '20231013000000|Z'
The workaround I have now is to change Z to Europe/London and it seems to works, but it would seems fair that timeZoneId could recognise Z as a valid timeZoneId.
The text was updated successfully, but these errors were encountered:
LotuxPunk
changed the title
DateTimeComponents.Format parse throws and exception when timeZoneId() is UTC
DateTimeComponents.Format parse throws an exception when timeZoneId() is UTC
Oct 16, 2024
I have this piece of code to handle a Long date (20241016153100) to an ISO8106 date, it works for most of the cases, but if
tz
is UTC, theid
will beZ
, and throw an exception.The workaround I have now is to change
Z
toEurope/London
and it seems to works, but it would seems fair that timeZoneId could recogniseZ
as a valid timeZoneId.The text was updated successfully, but these errors were encountered: