Epoch formatting result is wrong
yizhepku opened this issue · 1 comments
yizhepku commented
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 commented
Thanks, this looks like a bug.
…On Wed, Mar 1, 2023, 01:11 YizhePKU ***@***.***> wrote:
fn main() {
println!("{}", Epoch::from_str("1700-01-01T00:00:00 TAI").unwrap());
// prints 1799-12-32T00:00:00 UTC
}
The bug seems to only appear for year < 1800.
—
Reply to this email directly, view it on GitHub
<#204>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABEZV2AAFEE5W3O2PCYEJBDWZ4ADVANCNFSM6AAAAAAVLW2QZU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>