We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60b5ca6 commit 7b4e507Copy full SHA for 7b4e507
library/std/src/sys/pal/unix/fs.rs
@@ -517,7 +517,7 @@ impl FileAttr {
517
518
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
519
pub fn modified(&self) -> io::Result<SystemTime> {
520
- Ok(SystemTime::from(self.stat.st_mtim))
+ SystemTime::new(self.stat.st_mtim.tv_sec as i64, self.stat.st_mtim.tv_nsec as i64)
521
}
522
523
#[cfg(not(any(
@@ -545,7 +545,7 @@ impl FileAttr {
545
546
547
pub fn accessed(&self) -> io::Result<SystemTime> {
548
- Ok(SystemTime::from(self.stat.st_atim))
+ SystemTime::new(self.stat.st_atim.tv_sec as i64, self.stat.st_atim.tv_nsec as i64)
549
550
551
#[cfg(any(
0 commit comments