Is here anybody who can say exactly what UNIX TIMESTAMP is and describe its relation with Date and Time functions group (especially gm...), with daylight saving time and with local time zone?
Below there is a code, where comments are result of executing on my PC, (my GMT Offset = +2 hours = +7200 sec.). Plese, see this code carefully before doing any findings.
Some trubles appear as with summer (daylight saving time) as with winter time. Especailly is concerns the gmmktime รจ gmdate functions.
<?
$df="d.m.Y - H:i:s (Z)";
$t=mktime(0,0,0,1,2,1970);
echo "<br><b>Make 02.01.1970 - 00:00:00 (Local):</b><br>",
"Timestamp: $t<br>", // 79200
"GMT: ", gmdate($df,$t), "<br>", // 01.01.1970 - 22:00:00 (7200)
"Local: ", date($df,$t), "<br>", // 02.01.1970 - 00:00:00 (7200)
"----------------------------------------<br>";
$t=gmmktime(0,0,0,1,2,1970);
echo "<br><b>Make 02.01.1970 - 00:00:00 (GMT):</b><br>",
"Timestamp: $t<br>", // 82800 (Why !=86800 ?)
"GMT: ", gmdate($df,$t), "<br>", // 01.01.1970 - 23:00:00 (7200)
"Local: ", date($df,$t), "<br>", // 02.01.1970 - 01:00:00 (7200)
"----------------------------------------<br>";
$t=mktime(0,0,0,7,20,1970);
echo "<br><b>Make 02.07.1970 - 00:00:00 (Local):</b><br>",
"Timestamp: $t<br>", // 17269200
"GMT: ", gmdate($df,$t), "<br>", // 01.07.1970 - 21:00:00 (7200)
"Local: ", date($df,$t), "<br>", // 02.07.1970 - 00:00:00 (10800)
"----------------------------------------<br>";
$t=gmmktime(0,0,0,7,20,1970);
echo "<br><b>Make 02.07.1970 - 00:00:00 (GMT):</b><br>",
"Timestamp: $t<br>", // 17280000 (=86400*200)
"GMT: ", gmdate($df,$t), "<br>", // 02.07.1970 - 00:00:00 (7200)
"Local: ", date($df,$t), "<br>", // 02.07.1970 - 03:00:00 (10800)
"----------------------------------------<br>";
?>