Skip to content

Large year values are not parsed correctly #160

@Maximkaaa

Description

@Maximkaaa

If the year value is larger then 9999, the parsing result is inconsistent with GNU implementation:

Input: 10000-12-31
GNU: 10000-12-31 00:00:00+00:00
parse_datetime: 0000-12-31 00:00:00+00:00

Input: 100000-12-31
GNU: 100000-12-31 00:00:00+00:00
parse_datetime: 2000-12-31 00:00:00+00:00

Input: 1000000-12-31
GNU: 1000000-12-31 00:00:00+00:00
parse_datetime: 0000-12-31 00:00:00+00:00

Input: 10000000-12-31
GNU: 10000000-12-31 00:00:00+00:00
parse_datetime: Invalid input string: cannot be parsed as a relative time

Input: 2147485547-12-31
GNU: 2147485547-12-31 00:00:00+00:00 // This is the max value supported by GNU
parse_datetime: Invalid input string: cannot be parsed as a relative time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions