utime.h(7POSIX)
π utime.h(7POSIX) β the access & modification times header, bestie edition π
okay so real talk: this is a page from the POSIX Programmer's Manual (yes, that's the manual name, 7POSIX section energy π). And here's the tea:
Heads up! The Linux implementation of this interface may differ β go read the matching Linux manual page for the actual Linux behavior. Or, plot twist, the interface may not be implemented on Linux at all. π
πΈ PROLOG πΈ
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
β¨ NAME β¨
utime.h β access and modification times structure π°οΈπ
π¦ SYNOPSIS π¦
#include <utime.h>
π DESCRIPTION π
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 shall be measured in seconds since the Epoch. β³ no cap, that's the whole vibe of time here.
The <utime.h> header shall define the time_t type as described in <sys/types.h>. (go read that one, bestie, it's the source of truth β¨)
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 *);
The following sections are informative. (translation: the vibes sections, not the rules sections π«Ά)
π APPLICATION USAGE π
Lowkey important: the utime() function only allows setting file timestamps to the nearest second. That's it, that's the resolution. π
Applications should use the utimensat() function instead. See <sys/stat.h>. slay, upgrade your syscalls β
π§ RATIONALE π§
None. π literally none. iconic of them honestly.
π FUTURE DIRECTIONS π
The <utime.h> header may be removed in a future version. π¨ not me warning you about deprecation, but yes, that's the warning. plan accordingly bestie.
π 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 π«Ά brought to you by IEEE/The Open Group, dated 2017 β the year this standard said what it said and then dipped. β¨ mwah, go set some timestamps π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms