Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Epoch formatting result is wrong #204

@yizhepku

Description

@yizhepku
fn main() {
    println!("{}", Epoch::from_str("1700-01-01T00:00:00 TAI").unwrap());
    // prints 1799-12-32T00:00:00 UTC

    println!("{}", Epoch::from_str("1799-01-01T00:00:00 TAI").unwrap());
    // prints 1898-12-31T00:00:00 UTC
}

The bug seems to appear (mostly) for year < 1800.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions