date datetime timestamp code example
Example: DateTime and Timestamps
$dateTime = new DateTime('2016-05-20');
echo $dateTime->getTimestamp();
# Output: 1271802325
$dateTime = new DateTime('2016-05-20');
echo $dateTime->getTimestamp();
# Output: 1271802325