Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epoch formatting result is wrong #204

Closed
YizhePKU opened this issue Mar 1, 2023 · 1 comment · Fixed by #233
Closed

Epoch formatting result is wrong #204

YizhePKU opened this issue Mar 1, 2023 · 1 comment · Fixed by #233

Comments

@YizhePKU
Copy link

YizhePKU commented Mar 1, 2023

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.

@ChristopherRabotin
Copy link
Member

ChristopherRabotin commented Mar 1, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants