KHTTP_EPOCH2DATETIME(3)
π khttp_epoch2datetime(3) π
okay so bestie, this little icon is from the Library Functions Manual, and the main character is literally khttp_epoch2datetime π
π NAME π
khttp_epoch2datetime β convert time to components β¨
π LIBRARY π
library βlibkcgiβ π«Ά
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
void
khttp_epoch2datetime(int64_t epoch, int64_t *sec, int64_t *min,
int64_t *hour, int64_t *mday, int64_t *mon, int64_t *year,
int64_t *wday, int64_t *yday);
π§ DESCRIPTION π§
So what it does is format an epoch value β thatβs seconds since Jan 1, 1970, 00:00:00 UTC β into its broken-down time components. The components get filled in like this, no cap:
secβ seconds0β59β±οΈminβ minutes0β59π°οΈhourβ hours0β23πdayβ day of month1β31πmonβ month1β12πΈyearβ year-2.9e11β2.9e11π€―ydayβ day in year0β365ποΈwdayβ day in week0β6(Sunday = 0) π
If any of the pointers are NULL, they are ignored β super chill, no drama π
For broken-down time values suitable for struct tm, see khttp_epoch2tms(3) π
π SEE ALSO π
π«Ά AUTHORS π«Ά
Written by Kristaps Dzonsons <kristaps@bsd.lv> π
xoxo, signing off from Debian with the date stamp $Mdocdate$ and the title KHTTP_EPOCH2DATETIME(3) β slay π
π
π¦ where this page comes from
- alpine 3.24: kcgi-doc 1.0.1-r0 Β· ISC
- Copyright (c) 2020 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms