Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

time, time64 - get time since the Epoch

&pagelevel(4)&pagelevel

Syntax

#include <sys/types.h>
#include <time.h>

time_t time(time_t *tloc);
time64_t time64(time64_t *tloc);

Description

time() returns the current time (local time) as the number of seconds that have elapsed
since 00:00:00 UTC (Universal Time Coordinated, January 1, 1970).

If tloc is non-zero, the result is also stored in the location to which tloc points.

As of 19.1.2038 03:14:08 hrs UTC time outputs the message CCM0014 and terminates the
program.

The time64() function behaves like time with the difference that it also returns correct
results after 19.1.2038 03:14:07 hrs.

BS2000
time() returns the current time (local time) as the number of seconds that have elapsed
since January 1, 1970, 00:00:00 local time. (End)

(time_t)-1
(time64_t)-1

if an error occurs. errno is set to indicate the error.

Notes

time() fails and its actions are undefined if tloc points to an illegal address.

See also

ctime(), time.h.