Skip to content

qtime.3

Manvendra Bhangui edited this page Feb 25, 2024 · 3 revisions

NAME

qtime - transform date and time to ASCII

SYNOPSIS

#include <datetime.h>

char *qtime(const datetime_sec dts);

DESCRIPTION

The qtime(), function take an argument of data type datetime_sec, which represents calendar time. When interpreted as an absolute time value, it represents number of real-time seconds that have elapsed since the end of 1969 TAI.

qtime(dts) converts the calendar time t into a null-terminated string of the form

"Tue Jun 30 09:28:41 2021\n"

The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat". The abbreviations for the months are "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", and "Dec". The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions.

RETURN VALUE

On success, qtime() return a pointer to a string.

SEE ALSO

date(1) gettimeofday(2) time(2) utime(2) clock(3) difftime(3) strftime(3) strptime(3) datetime(3), caltime(3), caltime_tai(3), timegm(3) tzset(3) time(7)

Clone this wiki locally