I see a lot of discussion about getting dates that are pre-1970. For example, I see people ask a question like, "how do I get a date before 1970?"
What I'd like to know is what is so special about 1970? Why do people have trouble getting dates before that particular year? Was it the beginning of the universe or something?
The Unix epoch is at the beginning of 1970 meaning that any timestamp prior to 1970 needs to be represented as a negative number representing the number of seconds until January 1st, 1970 00:00:00 UTC.
In a computing context, an epoch is the date and time relative to which a computer's clock and timestamp values are determined. The epoch traditionally corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system.
The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. A DATETIME or TIMESTAMP value can include a trailing fractional seconds part in up to microseconds (6 digits) precision.
The Epoch time is a popular convention for computers to track the time. The Epoch time starts at00:00:00 Thu 01 Jan 1970 UTC and is measured in seconds. The Epoch time is thus the number of seconds since Epoch zero.
It is the beginning of the UNIX epoch, timestamp 0. All UNIX timestamps are the number of seconds since January 1st 1970 UTC. The moment of this writing is timestamp 1298440626.
UNIX timestamps pop up in the datetime libraries of a lot of languages and software, as storing times as a number of seconds is convenient for various reasons.
Since 1970 is time 0, dates before then can't typically be stored as timestamps.
It has to do with UNIX times. They're strored as number of seconds since the epoch, and the epoch is defined as the start of the day January 1, 1970 (UTC).
That's also the cause for the upcoming Y2K38 bug where the value will roll over to negative sometime early Feb (from memory) in 2038. Unless they up it to beyond a signed 32-bit value, of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With