time_t is a semantic C type for calendar time. Its precision can vary across platforms, so its representation is implementation-dependent rather than a universally fixed numeric format. section 5.2
Comparing calendar times
Obtain timestamps with time(0), then pass two time_t values to difftime(t1, t0) when a time difference suitable for arithmetic is needed. Do not assume that directly subtracting timestamps expresses seconds portably. section 5.2
Table 5.1 Base types according to the four main type classes. Types with a gray background don’t allow for arithmetic; they are promoted before doing arithmetic. Type char is special since it can behave like unsigned or signed, depending on the platform. All types in this table are considered to be distinct types, even if they have the same class and precision.
| Class | Systematic name | Other name | Rank | |
|---|---|---|---|---|
| Integers | Unsigned | bool | _Bool | 0 |
unsigned char | 1 | |||
unsigned short | 2 | |||
unsigned int | unsigned | 3 | ||
unsigned long | 4 | |||
unsigned long long | 5 | |||
| [Un]signed | char | 1 | ||
| Signed | signed char | 1 | ||
signed short | short | 2 | ||
signed int | signed or int | 3 | ||
signed long | long | 4 | ||
signed long long | long long | 5 | ||
| Floating point | Real | float | ||
double | ||||
long double | ||||
| Complex | float _Complex | float complex | ||
double _Complex | double complex | |||
long double _Complex | long double complex | |||
Use the specialized arithmetic-types table to compare time_t with clock_t and other semantic types, including their headers and meanings. section 5.2

