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 = MagentoFrameworkAppObjectManager::getInstance();
$objDate = $objectManager->create('MagentoFrameworkStdlibDateTimeDateTime');
$date = $objDate->gmtDate();
$ndate = date('H:i', strtotime($date));
?>
< ?php echo $ndate;?>