tool: Use mtime of the symlink rather than the target
When using the target, this will always result in a timestamp from 1970 because the symlink points to the store.
This commit is contained in:
parent
979d25ee13
commit
c22352ca20
|
@ -96,7 +96,7 @@ impl fmt::Display for Generation {
|
|||
}
|
||||
|
||||
fn read_build_time(path: &Path) -> Result<Date> {
|
||||
let build_time = time::OffsetDateTime::from_unix_timestamp(fs::metadata(path)?.mtime())?.date();
|
||||
let build_time = time::OffsetDateTime::from_unix_timestamp(fs::symlink_metadata(path)?.mtime())?.date();
|
||||
Ok(build_time)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue