hi
I did not know that timesstamp could be negative, and display dates BEFORE 1970.
Unix timestamp in PHP uses 32 bits to store data.
This means that timestamp value can be:
MAX: 2147483647 = 2038-01-19 03:14:07 +0000
MIN:-2147483648 = 1901-12-13 20:45:52 +0000
( see my script below )
So, timestamp, at present, is useful 13 Dec 1901 - 19 Jan 2038.
When writing scripts for historical dates before 1902,
I think, unix timestamp can not be used.
When PHP in future will be adjusted to 64 bits computers
this probably means any historical and future dates
can be used with timestamp.
Or maybe there will be a new system recplacing Unix timestamp?
==================
Output of my test script:
2038-01-19 03:14:07 +0000 -2147483649
1901-12-13 20:45:52 +0000 -2147483648
1901-12-13 20:45:53 +0000 -21474836471970-01-01 00:00:00 +0000 0
2038-01-19 03:14:06 +0000 2147483646
2038-01-19 03:14:07 +0000 2147483647
1901-12-13 20:45:52 +0000 2147483648
<?php
$stamp = -2147483649; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
$stamp = -2147483648; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
$stamp = -2147483647; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
echo '<br>';
$stamp = 0; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
echo '<br>';
$stamp = 2147483646; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
$stamp = 2147483647; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
$stamp = 2147483648; echo gmdate( "Y-m-d H:i:s O", $stamp ).' '.$stamp.'<br>';
?>