aports/community/arti/disable_system_time_conversion_patch
2024-04-05 20:33:22 +00:00

31 lines
1.1 KiB
Plaintext

Y2038 is still an issue on 32b musl rust.
https://github.com/rust-lang/libc/issues/1848
https://github.com/rust-lang/libc/pull/3068
--- a/crates/tor-hsservice/src/time_store.rs
+++ b/crates/tor-hsservice/src/time_store.rs
@@ -516,21 +516,6 @@ mod test {
}
#[test]
- #[allow(clippy::unusual_byte_groupings)] // we want them to line up, dammit!
- fn system_time_conversions() {
- assert!(system_time_min() <= SystemTime::UNIX_EPOCH);
- assert!(system_time_max() > SystemTime::UNIX_EPOCH);
-
- let p = |s| parse_rfc3339(s).expect(s);
- let time_t_2st = time_t_to_system_time;
- assert_eq!(p("1970-01-01T00:00:00Z"), time_t_2st(0));
- assert_eq!(p("2038-01-19T03:14:07Z"), time_t_2st(0x___7fff_ffff));
- assert_eq!(p("2038-01-19T03:14:08Z"), time_t_2st(0x___8000_0000));
- assert_eq!(p("2106-02-07T06:28:16Z"), time_t_2st(0x_1_0000_0000));
- assert_eq!(p("4147-08-20T07:32:16Z"), time_t_2st(0x10_0000_0000));
- }
-
- #[test]
fn ref_fmt() {
let time_t = 1217635200;
let rf = Reference { time_t };