Magento get current date time
Magento get current date time
You Can get Current date and time (according to timezone) in magento as following
Mage::getModel('core/date')->date('Y-m-d H:i:s');
Or You Can use following method
date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));
Advertisements
Add Comment
📖 Read More
- 1. Fatal error: Call to a member function setSaveParametersInSession() on a non-object in \mage\app\code\core\Mage\Adminhtml\Block\Widget\Grid\Container.php on line 66
- 2. magento admin system configuration 404
- 3. Item with the same id already exist magento collection
- 4. Magento cron not working
- 5. Exception 'Mage_Core_Exception' with message 'Invalid callback: