This blog is a note of Chapter 6 (System Data Files and Information) in APUE.
The basic time service provided by the UNIX kernel counts the number of seconds that have passed since the Epoch: 00:00:00 January 1, 1970, Coordinated Universal Time (UTC). These seconds are represented in a time_t
data type, and we call them calendar times. These calendar times represent both the time and the date.
The figure below shows the relationship of various time functions:
Conversion specifiers for strftime
:
Conversion specifiers for strptime
: