Skip to content

Commit 3505c8e

Browse files
committed
sys.set_modtime: try no space time format
1 parent de22f30 commit 3505c8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

+stdlib/+sys/set_modtime.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
elseif ismac()
66
cmd = sprintf("touch -mt %s %s", string(t, "yyyyMMddHHmm"), p);
77
else
8-
cmd = sprintf("touch -d '%s' %s", string(t, "yyyy-MM-dd HH:mm:ss"), p);
8+
% https://man7.org/linux/man-pages/man1/touch.1.html
9+
cmd = sprintf("touch -t %s %s", string(t, "yyyyMMddHHmm"), p);
910
end
1011

1112
[s, m] = system(cmd);

0 commit comments

Comments
 (0)