Skip to content

Timestamp::saturating_add misbehaves if the span contains calendar units #36

@FeldrinH

Description

@FeldrinH
let now = Timestamp::now();
let span = 1.day();
println!("{}", now.saturating_add(span));

Expectation: Error, panic or some other indication that addition failed.

Actual result: 9999-12-30T22:00:00.999999999Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIssues that require a breaking change for resolution.bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions