On 2025-05-30 02:38, Peter Dyballa wrote:
My assumption was that when tar has to extrapolate an exact timestamp to
something inexact it needs rounding, which can make more than one file have the
same timestamp.
As far as I know, all 'tar' implementations floor (i.e., truncate
towards minus infinity) rather than round. And I think POSIX requires
this for 'pax', which is POSIX's replacement for 'tar'. But even if
macOS 'tar' rounds, we should be OK so long as its timestamp conversion
function (whether floor or round or something else) is monotonically
nondecreasing.
Make and such rely on timestamps and could get fooled by equal timestamps.
Only if 'make' considers equal timestamps to be out of date. Although
POSIX allows this behavior, as far as I know only HP-UX 'make' does it.
What happens on your platform when you run the following shell commands
in a fresh directory?
touch -t 202505290000 a b
gls -l --time-style=full a b
echo 'b: a; echo ouch; false' >Makefile
make
If this outputs 'ouch' then your 'make' acts like HP-UX 'make', which
would surprise me.