This question already has an answer here:
I'm newbie in C/linux.
man time_t is unsuccess. I'm trying to clarify what exactly
time_t type is? It's ok when I'm assign
const int to the variable type
time_t as follows:
Seems this type is just alias for some numeric type. But I don't understand what is this type?
Best How To :
Yes it is usually an alias, but it is standard type in C/C++. It can be used not only in Linux.
Alias of a fundamental arithmetic type capable of representing times, as those returned by function time.
For historical reasons, it is generally implemented as an integral value representing the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC (i.e., a unix timestamp). Although libraries may implement this type using alternative time representations.
Portable programs should not use values of this type directly, but always rely on calls to elements of the standard library to translate them to portable types.