I want to load the current local time in a custom phtml file, that I want to load in my CMS Page.
I currently have the following code but that loads the GMC time, not my local time.
How can I change this?
CODE:
<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$objDate = $objectManager->create('Magento\Framework\Stdlib\DateTime\DateTime');
$date = $objDate->gmtDate();
$ndate = date('H:i', strtotime($date));
?>
<?php echo $ndate;?>