Search notes:

Unix time

Unix time, aka
Unix time is the number of seconds that have elapsed since 00:00:00, 1 January 1970, UTC, without counting the leap seconds.
Thus, every day is viewed as having exactly 86400 seconds.
Negative values for Unix time are allowed which allows to specify point in time that was before 1970-01-01.
The latest point in time that can be represented with a 32 bit Unix time is 231-1 seconds after 1970-01-01. This gives raise to the Year 2038 problem.
In C, a Unix time is usually stored in a variable whose type is time_t (See also libc: Date and time).

Converting dates from/to Unix epoch

Shell

In a shell, a date can be converted to a Unix epoch with the +%s format:
$ date +%s -d '2023-08-14 08:05:17'
1691964000
The date corresponding to a Unix epoch can then be found with the at-sign:
$ date date +'%F %T' -d @1691993117
2023-08-14 08:05:17

See also

The strftime format specifier for the Unix time is %c (which is not availble on Windows).
The PHP function time().
In quite a few programming languages, a Unix time can be converted to a human readable string with the function strftime.
ISO 8601
time is an undocumented function in KernelBase.dll that returns the Unix time, that is: the number of seconds since January 1st, 1970.

Index