utimes
¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/utimes.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
utimensat(AT_FDCWD,file,times,0)
,
or the gnulib module utimens
,
instead.
noatime
attribute,
this function might not modify the access time as requested:
Linux kernel 6.9.
utimes (file, NULL)
fails to set the
file’s timestamp to the current time:
glibc 2.3.3.
utimes
failed on read-only files when
utime
worked fine.
glibc 2.2.5.
Extension: Gnulib provides a module ‘utimens’ that works around these problems and allows to set the time with nanosecond resolution (as far as supported by the file system).