How to get Unix Local Time?

Please use DateTime::getTimestamp() that returns unix timestamp.

If you want to format the date according to your time zone then you try this.

$datetime = new DateTime("now", new DateTimeZone('America/New York'));

echo $datetime ->format('m/d/Y, H:i:s');