Current course:

PHP Date & Time

PHP has many functions that can retrieve and manipulate the date and the time. Because PHP is a server-side language, the date/time retrieved will be the servers date and time, not the local machine. With Javascript, you can get the local machines date/time. date, mktime, strtotime, strftime, php time vs javascript time, timestamps (db)
$today = date("Y-m-d H:i:s"); // 2010-03-15 09:58:47
$lastWeek = date("M-d-Y", mktime(0, 0, 0, date('m'), date('d')-7, date('Y')));
$yearAgoToday = date("M-d-Y", mktime(0, 0, 0, date('m'), date('d'), date('Y')-1));

Tries to converts a time (in english) to a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC) $myTimestamp = strtotime("10 September 2000");