<?php
$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); //Magento's timestamp function makes a usage of timezone and converts it to timestamp
$date = date('Y-m-d', $currentTimestamp); //The value may differ than above because of the timezone settings.
$time=date('H:i:s',$currentTimestamp);
echo "Date:". $date.'<br>';
echo "Time:".$time;
?>
Categories: Magento
0 Comments