timestamp php
snippet in php

timestamp php

user3649

<?php
$current_Unix_time_in_seconds = time();
echo $current_Unix_time_in_seconds; //Prints ten digit integer
//To convert the above unix integer time to string follow the below steps

$date = date("D d-m-Y", $current_Unix_time_in_seconds);
echo $date;
//prints date in the format of day day-month-year

//for more reference visit the source link
?>

timestamp php

user7818


<?php
$date = new DateTime();
echo $date->getTimestamp();
?>

php time

user7646

<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>

timestamp php

user9051


<?php
$date = date_create();
echo date_timestamp_get($date);
?>