My first reaction was “yes, there are operating systems with sub-second timestamps, but I don’t know whether I want to act differently depending on whether the OS does it or not”. But then, Stéphane wrote over the mailing list - https://www.mail-archive.com/miros- m...@mirbsd.org/msg00970.html - that POSIX is likely to add this, so I guess we’ll have to bite the bullet and do so.
Note that many tools and file formats (e.g. in the case of archivers) will continue to not handle sub-second timestamps, and that introducing tools that do support it *will* cause inconsistency (e.g. after unarchiving, or synchronising from another machine). Thanks for reminding about the issue. ** Changed in: mksh Importance: Undecided => Low ** Changed in: mksh Status: New => Confirmed ** Changed in: mksh Assignee: (unassigned) => Thorsten Glaser (mirabilos) -- You received this bug notification because you are a member of mksh Mailing List, which is subscribed to mksh. Matching subscriptions: mkshlist-to-mksh-bugmail https://bugs.launchpad.net/bugs/1855325 Title: test -nt and -ot ignore the subsecond part of file timestamps Status in mksh: Confirmed Bug description: Example on Linux (RHEL 8): $ touch a; sleep 0.1; touch b $ ls --full-time a b -rw-r--r-- 1 kendall staff 0 2019-12-05 13:41:43.483652556 -0500 a -rw-r--r-- 1 kendall staff 0 2019-12-05 13:41:43.585652744 -0500 b $ if [ a -ot b ]; then print older; fi $ if [[ a -ot b ]]; then print older; fi $ The last two commands should have printed "older". $ print $KSH_VERSION @(#)MIRBSD KSH R56 2018/01/14 $ uname -sr Linux 4.18.0-80.el8.x86_64 R49 on Cygwin and R46 on RHEL 7 have the same behavior. To manage notifications about this bug go to: https://bugs.launchpad.net/mksh/+bug/1855325/+subscriptions