Skip to content

PHP code snippet – 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

echo $dt->format('Y-m-d H:i:s');
See also  How to create a hotkey in Python?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.