“I need to store birthdate of my customers where it can fall before year 1970.”
Php function date(), strtotime() uses UNIX timestamp which supports year 1970 to 2038.
To work with date values beyond that, we need to use php datetime class which is available on after php version 5.2.0 (datetime manual).
Create a date before 1970:
$dt = new DateTime(); $dt->setDate(1945, 8, 8); // August 8 1945, end of world war 2
If you need to store time as well:
//public DateTime DateTime::setTime ( int $hour , int $minute [, int $second = 0 ] ) //seconds argument is optional $dt->setTime(8,0,45); // 8:00:45 am
To print the date:
echo $dt->format('Y-m-d H:i:s'); //outputs //1945-08-08 08:00:45
For list of date format to use, refer to http://php.net/manual/en/function.date.php.
Hope it helps. =D