Tuesday 1 November 2016

Magento2 : getting store configured timezone date time

Hello Everyone here is the code to get store configured date time

$timezone = $this->_objectManager->create(
            '\Magento\Framework\Stdlib\DateTime\TimezoneInterface'
            );

strftime('%Y-%m-%d %H:%M:%S', $timezone->scopeTimeStamp())

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home