Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened on Dec 31 1969 at 7:00 PM

Tags:

date

php

history

Every time in PHP when I make a variable such as this one:

$date = strtotime($row['date']); $date = date("M d Y \a\\t g:i A", $date); // Mmm dd YYYY at h:mm PM/AM 

and somehow row['date'] happens to be 0, the date Dec 31 1969 at 7:00 PM is displayed on the screen? Google does not tell me much, I was wondering if this date had any significances.

like image 680
David Avatar asked Mar 05 '10 22:03

David


People also ask

What happened on the 31st of December 1969?

Nothing specific happened. When your digital device or software/web application is showing you December 31, 1969, this suggests that most likely there's a bug someone and the Unix epoch date is being displayed.

What is the Unix epoch date?

January 1st, 1970 at 00:00:00 UTC is referred to as the Unix epoch. Early Unix engineers picked that date arbitrarily because they needed to set a uniform date for the start of time, and New Year's Day, 1970, seemed most convenient.


1 Answers

The Unix epoch is the time 00:00:00 UTC on 1 January 1970. This is the reference point for all time stamps. When you use PHP's date/time functions, you're always working with the number of seconds since the epoch. Time 0 is the epoch, and you (or your web server) must be on the east coast of the US, which is 5 hours behind UTC time.

like image 173
echo Avatar answered Sep 29 '22 11:09

echo