diff --git a/src/builtins/path.cpp b/src/builtins/path.cpp index aa0fb2fae..4a595093b 100644 --- a/src/builtins/path.cpp +++ b/src/builtins/path.cpp @@ -623,9 +623,9 @@ static int path_mtime(parser_t &parser, io_streams_t &streams, int argc, const w n_transformed++; if (!opts.relative) { - path_out(streams, opts, to_string(ret.change_seconds)); + path_out(streams, opts, to_string(ret.mod_seconds)); } else { - path_out(streams, opts, to_string(t - ret.change_seconds)); + path_out(streams, opts, to_string(t - ret.mod_seconds)); } } } diff --git a/tests/checks/path.fish b/tests/checks/path.fish index 79c1a5dd2..f4a9c0f3e 100644 --- a/tests/checks/path.fish +++ b/tests/checks/path.fish @@ -216,3 +216,7 @@ or echo mtime is too small test $mtime -lt 20 or echo mtime is too large + +touch -m -t 197001020000.00 epoch +path mtime epoch +# CHECK: 82800