Perhaps this answers your question.
http://www.epochconverter.com/programming/functions-php.php
Here is the content of the link:
There are many options:
strtotime parses most English texts for eras / Unix Time.
echo strtotime("15 November 2012");
echo strtotime("2012/11/15");
echo strtotime("+10 days");
It is important to verify the success of the conversion:
// PHP 5.1.0 or higher, earlier versions check: strtotime($string)) === -1
if ((strtotime("this is no date")) === false) {
echo 'failed';
}
2. Using the DateTime class:
The PHP 5 DateTime class is more convenient to use:
$date = new DateTime('01/15/2010');
echo $date->format('U');
$date = date_create('01/15/2010');
echo date_format($date, 'U');
The date format "U" converts the date to a UNIX timestamp.
- Using 'mktime':
This version is more complex, but works on any PHP version.
date_default_timezone_set('UTC');
mktime ( $hour, $minute, $second, $month, $day, $year );
mktime ( $hour, $minute, $second, $month, $day, $year, $is_dst );
echo mktime(0, 0, 0, 1, 1, 2000);