Skip to content

NaiveDateTime::from_timestamp_millis(-1000) does not compare equal to NaiveDateTime::from_timestamp_opt(-1, 0) #903

@umanwizard

Description

@umanwizard

Title says it all. This seems to be because the former gets interpreted as -2 seconds and 1 billion nanoseconds, whereas the latter gets interpreted as -1 seconds and 0 nanoseconds.

These feel to me like they should be equal, but I might be missing some subtlety.

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