<?php echo date("Y-m-d", Mage::getModel('core/date')->timestamp(time()))?>
it will echo for instance "2010-07-21"
that's all
本文介绍了一个在Magento中显示当前日期时间的方法,通过使用核心模型获取时间戳并转换为指定格式。
<?php echo date("Y-m-d", Mage::getModel('core/date')->timestamp(time()))?>
it will echo for instance "2010-07-21"
that's all
1429

被折叠的 条评论
为什么被折叠?