8000 Instant.parse() doesn't work with ISO8601 timestamp with offset · Issue #731 · js-joda/js-joda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Instant.parse() doesn't work with ISO8601 timestamp with offset #731
Open
@fluidsonic

Description

@fluidsonic

Input:
"@js-joda/core": "^5.6.3"

Instant.parse("2024-03-07T15:30:00+08:00")

Java (expected)

Instant (2024-03-07T07:30:00Z)

js-joda (actual)

DateTimeParseException: Text '2024-03-07T15:30:00+08:00' could not be parsed at index 19: 2024-03-07T15:30:00+08:00, at index: 19

Workaround

OffsetDateTime.parse("2024-03-07T15:30:00+08:00").toInstant()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0