However, people are not used to working with Epoch seconds. We are
more used to dealing with individual year, month, day, hour, minute,
and second values. Furthermore, the month can be represented by its
full name or its abbreviation. The day can precede or follow the
month. Because of the difficulty of performing calculations with a
variety of formats, we typically convert human-supplied strings or
lists to Epoch seconds, calculate, and then convert back to strings
or lists for output.
Epoch seconds are an absolute number of seconds, so they don't take
into account time zones or daylight saving times. When converting to
or from distinct values, always consider whether the time represented
is UTC or local. Use different conversion functions depending on
whether you need to convert from UTC to local time or vice versa.
The values for seconds range from 0-60 to account for leap seconds;
you never know when a spare second will leap into existence at the
urging of various standards bodies.
Epoch seconds values are limited by the size of an integer. If you
have a 32-bit signed integer holding your Epoch seconds, you can only
represent dates (in UTC) from Fri
Dec 13
20:45:52 1901 to
Tue Jan 19
03:14:07 2038 (inclusive). By
2038, it is assumed, computers will change to use larger integers for
Epoch seconds. We hope. For operations on dates outside this range,
you must use another representation or work from distinct year,
month, and day values.