bug: From implementation (DateTime -> Timestamp)
This implementation of the From trait may have some errors: https://github.com/tokio-rs/prost/blob/468c80cd343321d5d4b361febbeec832ab5228b6/prost-types/src/datetime.rs#L576
Examples of DateTimes unable to be converted to Timestamps were:
-
panicked at 'attempt to subtract with overflow', https://github.com/tokio-rs/prost/blob/468c80cd343321d5d4b361febbeec832ab5228b6/prost-types/src/datetime.rs#L421 year: vec![178, 2, 0, 0, 0, 0, 0, 128] month: vec![2] day: vec![2] hour: vec![8] minute: vec![58] second: vec![8] nanos: vec![0, 0, 0, 50] -
panicked at 'attempt to subtract with overflow', https://github.com/tokio-rs/prost/blob/468c80cd343321d5d4b361febbeec832ab5228b6/prost-types/src/datetime.rs#L441 year: vec![132, 7, 0, 0, 0, 0, 0, 128] month: vec![2] day: vec![2] hour: vec![8] minute: vec![58] second: vec![8] nanos: vec![0, 0, 0, 50] -
panicked at 'attempt to multiply with overflow', https://github.com/tokio-rs/prost/blob/468c80cd343321d5d4b361febbeec832ab5228b6/prost-types/src/datetime.rs#L479C8-L479C8 year: vec![80, 96, 32, 240, 99, 0, 32, 180] month: vec![1] day: vec![18] hour: vec![19] minute: vec![26] second: vec![8] nanos: vec![0, 0, 0, 50]
@danburkert if you have the time can you take a look
@binarynewts Can you confirm that #1095 fixes this problem?