Skip to content

Custom DateTime/Date Pattern uses 'Year of Era' instead of 'Year', which is not (strictly) ISO 8601 compliant #1688

@timvahlbrock

Description

@timvahlbrock

The default for dateTimePattern is yyyy-MM-dd'T'HH:mm:ss.SSSXXX, which seems to be ISO 8601 compliant, but actually isn't because y means "year of era", not "year". This means that when parsing strictly the year would need additional indication whether the year is before or after christ - which is not ISO compliant. Actually ISO compliant would be uuuu-MM-dd'T'HH:mm:ss.SSSXXX. With the current pattern parsing fails in strict mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions