diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /src/tools/rust-analyzer/xtask/src/dist.rs | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/rust-analyzer/xtask/src/dist.rs')
-rw-r--r-- | src/tools/rust-analyzer/xtask/src/dist.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/xtask/src/dist.rs b/src/tools/rust-analyzer/xtask/src/dist.rs index 74715c53e..5a03c71b2 100644 --- a/src/tools/rust-analyzer/xtask/src/dist.rs +++ b/src/tools/rust-analyzer/xtask/src/dist.rs @@ -6,6 +6,7 @@ use std::{ }; use flate2::{write::GzEncoder, Compression}; +use time::OffsetDateTime; use xshell::{cmd, Shell}; use zip::{write::FileOptions, DateTime, ZipWriter}; @@ -112,7 +113,8 @@ fn zip(src_path: &Path, symbols_path: Option<&PathBuf>, dest_path: &Path) -> any src_path.file_name().unwrap().to_str().unwrap(), FileOptions::default() .last_modified_time( - DateTime::from_time(std::fs::metadata(src_path)?.modified()?.into()).unwrap(), + DateTime::try_from(OffsetDateTime::from(std::fs::metadata(src_path)?.modified()?)) + .unwrap(), ) .unix_permissions(0o755) .compression_method(zip::CompressionMethod::Deflated) @@ -125,7 +127,10 @@ fn zip(src_path: &Path, symbols_path: Option<&PathBuf>, dest_path: &Path) -> any symbols_path.file_name().unwrap().to_str().unwrap(), FileOptions::default() .last_modified_time( - DateTime::from_time(std::fs::metadata(src_path)?.modified()?.into()).unwrap(), + DateTime::try_from(OffsetDateTime::from( + std::fs::metadata(src_path)?.modified()?, + )) + .unwrap(), ) .compression_method(zip::CompressionMethod::Deflated) .compression_level(Some(9)), |