Skip to content

NumericDate.MarshalJSON overflows on large unix timestamps #199

@qqiao

Description

@qqiao

Marshalling NewNumericDate(time.Unix(253402271999, 0)) will result in -4852145033 instead of 253402271999

Updates:
This is due to the fact that Time.UnixNano() overflows, and NumericDate.MarshalJSON() internally uses this method.

PR #200 created to workaround this std library limitation.

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