utime.h(0P)
π«Ά utime.h β access and modification times structure π
okay bestie, so this one is from the POSIX Programmer's Manual β it's utime.h(0P), the header that's all about when stuff got touched. sit down, hydrate, let's go β¨
πΈ PROLOG πΈ
so like, real talk before we even start: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β so pls consult the corresponding Linux manual page for details of Linux behavior. also it's fully possible the interface isn't implemented on Linux at all. π vibe check your platform first, fr fr.
β¨ NAME β¨
utime.h β the header for the access and modification times structure π
π SYNOPSIS π
#include <utime.h>
that's it. that's the whole entrance. iconic behavior honestly π
π¦ DESCRIPTION π¦
okay so the <utime.h> header shall declare the utimbuf structure, and that struct shall include these members:
time_t actime Access time.
time_t modtime Modification time.
the times are measured in seconds since the Epoch. yes, just seconds. we'll get to why that's lowkey a problem in a sec π
the <utime.h> header shall define the time_t type as described in <sys/types.h>.
and then β the following shall be declared as a function, and may also be defined as a macro. a function prototype shall be provided:
int utime(const char *, const struct utimbuf *);
also, for the record: the following sections are informative. (that's the manpage telling you the juicy part is over and the extra lore is next π)
π APPLICATION USAGE π
so here's the tea: the utime() function only allows setting file timestamps to the nearest second. that's it, that's the resolution, that's the whole camera πΈ
applications should use the utimensat() function instead. See <sys/stat.h>.
not me begging you to use the better one. bestie. please. the nanosecond girlies are waiting π§
π RATIONALE π
None.
(the standards committee said "no thoughts, head empty" and honestly? respect π«‘)
β FUTURE DIRECTIONS β
the <utime.h> header may be removed in a future version.
so likeβ¦ it's giving deprecated-by-implication. don't build your whole personality on it π
πΈ SEE ALSO πΈ
<sys_stat.h><sys_types.h>- The System Interfaces volume of POSIX.1β2017,
futimens(),utime()
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie!! this one's brought to you by IEEE/The Open Group, 2017, filed under utime.h(0P) β stay hydrated, use utimensat(), and go touch some files (timestamps, obviously) πβ¨ππ¦
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms