Answers for "how to get local current time in laravel"

PHP
0

how to get local current time in laravel

$dt = new DateTime($posts->updated_at);
$tz = new DateTimeZone('Asia/Kolkata'); // or whatever zone you're after

$dt->setTimezone($tz);
echo $dt->format('Y-m-d H:i:s');
Posted by: Guest on May-19-2021

Code answers related to "how to get local current time in laravel"

Browse Popular Code Answers by Language