![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/magento/module-sitemap/Block/Adminhtml/Grid/Renderer/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** * Sitemap grid link column renderer * */ namespace Magento\Sitemap\Block\Adminhtml\Grid\Renderer; class Time extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Framework\Stdlib\DateTime\DateTime $date, array $data = [] ) { $this->_date = $date; parent::__construct($context, $data); } /** * Prepare link to display in grid * * @param \Magento\Framework\DataObject $row * @return string */ public function render(\Magento\Framework\DataObject $row) { $time = date('Y-m-d H:i:s', strtotime($row->getSitemapTime()) + $this->_date->getGmtOffset()); return $time; } }