From 049cc452247d7fd54d786b06c558231350137590 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Wed, 14 Jun 2017 14:14:20 +0600 Subject: [PATCH] By default, show times in admin grids in the store timezone. fixes #9426 This test basically said, use the column config value, or use FALSE: $timezone = isset($this->getConfiguration()['timezone']) ? $this->booleanUtils->convert($this->getConfiguration()['timezone']) : false; The only config values currently present in the code set the 'timezone' config to FALSE using `false`. There are 0 occurances of `true` in the code base at this time. This makes me believe that the default value should not be FALSE but TRUE. Otherwise the outcome will always be FALSE, be it explicit or by default. This way the product review created_at times will be the same in the catalog/product/edit adminhtml page as well as on the Marketing | Reviews grid. They were not equal before this commit. The same goes for the CMS page grid, the CMS block grid, the customer grid, the online customers grid, and the sales grids. I believe admins wint to see these times in their configured time zone and not in UTC. Otherwise someone can appear to have placed an order in the future which is very confusing. --- app/code/Magento/Ui/Component/Listing/Columns/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/Component/Listing/Columns/Date.php b/app/code/Magento/Ui/Component/Listing/Columns/Date.php index 959bfe01f8eb6..db8e5e19c7386 100644 --- a/app/code/Magento/Ui/Component/Listing/Columns/Date.php +++ b/app/code/Magento/Ui/Component/Listing/Columns/Date.php @@ -57,7 +57,7 @@ public function prepareDataSource(array $dataSource) $date = $this->timezone->date(new \DateTime($item[$this->getData('name')])); $timezone = isset($this->getConfiguration()['timezone']) ? $this->booleanUtils->convert($this->getConfiguration()['timezone']) - : false; + : true; if (!$timezone) { $date = new \DateTime($item[$this->getData('name')]); }