GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KHTTP_EPOCH2DATETIME(3) FreeBSD Library Functions Manual KHTTP_EPOCH2DATETIME(3)

khttp_epoch2datetime
convert time to components

library “libkcgi”

#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);

Format an epoch value (seconds since Jan 1, 1970, 00:00:00 UTC) into its broken-down time components. The components are filled in as follows:
sec seconds 0–59
min minutes 0–59
hour hours 0–23
day day of month 1–31
mon month 1–12
year year -2.9e11–2.9e11
yday day in year 0–365
wday day in week 0–6 (Sunday = 0)

If any of the pointers are NULL, they are ignored.

For broken-down time values suitable for struct tm, see khttp_epoch2tms(3).

khttp_datetime2epoch(3), khttp_epoch2str(3), khttp_epoch2tms(3)

Written by Kristaps Dzonsons <kristaps@bsd.lv>.
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.