symfony get current datetime

52

$time = new \DateTime();
echo $time->format('H:i:s \O\n Y-m-d');
$date = new \DateTime('@'.strtotime('now'));
$time = date('H:i:s \O\n d/m/Y');

Comments

Submit
0 Comments