php date from timestam code example
Example 1: php datetime to timestamp
$time = '2021-03-31 23:59:00';
strtotime($time);
Example 2: php date object to timestamp
$date = new DateTime();
echo $date->getTimestamp();
$time = '2021-03-31 23:59:00';
strtotime($time);
$date = new DateTime();
echo $date->getTimestamp();