ELFTC_TIMESTAMP(3)
β¨ ELFTC_TIMESTAMP β¨
okay bestie, so this is elftc_timestamp from the libelftc library β she's a little function that hands you a timestamp, and no cap she's lowkey iconic for it π
πΈ NAME πΈ
elftc_timestamp β returns the current or environment-provided timestamp. that's it, that's the whole vibe πβ¨
π LIBRARY π
library βlibelftcβ β yeah, you're gonna need her, she's the main character here π
π¦ SYNOPSIS π¦
#include <libelftc.h>
int
elftc_timestamp(time_t *timestamp);
literally just include the header and call her, it's giving one-function-girlboss energy π«Ά
π DESCRIPTION π
okay so here's the tea β β elftc_timestamp() returns a timestamp that comes from the SOURCE_DATE_EPOCH environment variable if that's set. and if it's not set? she just falls back to the current time, courtesy of time(3). good for her honestly π
the timestamp argument is a pointer to the spot where the timestamp gets stored β so you're like, "here's where you put it bestie," and she puts it there π
π₯ RETURN VALUES π₯
elftc_timestamp()returns0on success β slay, we love a clean win β¨- and she returns
-1if something goes wrong β not the vibe, but at least she tells you π
π ERRORS π
bestie she may fail with these, so pay attention fr fr:
[EINVAL]βSOURCE_DATE_EPOCHcontains invalid characters. like girl what is that π[ERANGE]βSOURCE_DATE_EPOCHspecifies a negative value, or a value that cannot be stored in atime_t. too much, or too negative β either way, out of range π«
also heads up:elftc_timestamp()may also fail for any of the reasons described instrtoll(3). so like, that's a whole other can of worms, go read that one too π«Ά
π§ SEE ALSO π§
and that's the whole page, bestie! go forth and timestamp responsibly π¦π
mwah π β this lil Debian-flavoured page is dated August 24, 2016, and it's living rent-free in the ELFTC_TIMESTAMP(3) era β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libelftc 15.0.0
- Copyright (c) 2016 The FreeBSD Foundation. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms