Parsing ISO8601 DateTime with time zones formatted as "+0000"
See original GitHub issueParsing a string as an Instant like 2021-08-22T03:32:10+0000
fails due to fixOffsetRepresentation
adding :00
to the end of the string.
The underlying Java Time library is able to handle this fine.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:17 (10 by maintainers)
Top Results From Across the Web
ISO 8601 date-time format combining 'Z' and offset of '+0000'
No, the Z is an offset-from-UTC so it should not be combined redundantly with a numerical offset of +00:00 or +0000 . ISO...
Read more >Formatting and parsing dateTimes as strings - IBM
This section gives information on how you can specify the dateTime format using a string of pattern letters.
Read more >DateTimeFormatter (Java Platform SE 8 ) - Oracle Help Center
This returns an immutable formatter capable of formatting and parsing the ISO-8601 extended offset time format. The format consists of:
Read more >Class: Time (Ruby 2.5.1)
Parses date as a dateTime defined by the XML Schema and converts it to a Time object. The format is a restricted version...
Read more >Time handling | Dev Cheatsheets - Michael Currin
So when datetime.utcnow method is run, that gives the time at GMT+0000, ... Use ISO-8601 format: ... Parse ISO 8061 format date and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@merlin-zaraza Currently there’s no way to parse such values because
Instant.parse
doesn’t support this format. Later, when we implement custom formatting and parsing (see #58, #39), you’ll be able to parse such values with a custom format pattern.You can work around it currently by transforming an input value to the format
Instant.parse
supports, i.e. by inserting a:
between hours and minutes in the offset designator part.Thank you @dkhalanskyjb for the snippet.