PHP DateTime格式输出以秒为单位

How to output time zone in seconds to on this code.

 $tz                  = 'Asia/Manila';
 $timestamp           = time();
 $dt                  = new DateTime("now", new DateTimeZone($tz)); //first argument "must" be a string
 $dt->setTimestamp($timestamp); //adjust the object to correct timestamp
 $Manila_Time_Date    = $dt->format('F j, Y, g:i a');

$Manila_Time_Date = September 4, 2018, 6:07 am

How i can make:

$Manila_Time_Code = 1536012420 ( This to be Manila Timezone )

Use strtotime():

$tz                  = 'Asia/Manila';
$dt                  = new DateTime("now", new DateTimeZone($tz));
$Manila_Time_Date    = strtotime($dt->format('Y-m-d H:i:s'));  // <-
echo $Manila_Time_Date; // int(1536059258) 
echo "<br>";
echo var_dump(time);    //int(1536030458)