Is it possible to parse `2014-06-10T16:12:58-0400`...
# kotlinx-datetime
j
Is it possible to parse
2014-06-10T16:12:58-0400
?
o
Yes
j
How? I am trying
Instant.parse(...)
with no luck
Copy code
Exception in thread "main" kotlinx.datetime.DateTimeFormatException: java.time.format.DateTimeParseException: Text '2014-06-10T16:12:58-0400' could not be parsed at index 19
o
I thought you were asking about the PR I linked. It's not yet merged
j
Without it, I cant, no? Do you know when it will be merged and if it will be released soon?
o
If you're asking about the current state then no,
Instant.parse
only accepts
Z
timezone designator
j
I am checking now the PR, I hadn't seen it
j
Has it been merged? I still have the same issue
j
It should yes
j
I was going through the test functions and found this https://github.com/Kotlin/kotlinx-datetime/blob/bbbbd9c1de0689dadb04d62de6221d3e7497b4f0/core/common/test/InstantTest.kt#L103 I think it’s still not. valid datetime format. I’m trying to parse this for example
1969-12-31T19:00:00-0500
and it crashes