Skip to content

Commit 049cc45

Browse files
author
Anton Evers
committed
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 `<timezone>false</timezone>`. There are 0 occurances of `<timezone>true</timezone>` 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.
1 parent ec99590 commit 049cc45

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Ui/Component/Listing/Columns

1 file changed

+1
-1
lines changed

app/code/Magento/Ui/Component/Listing/Columns/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function prepareDataSource(array $dataSource)
5757
$date = $this->timezone->date(new \DateTime($item[$this->getData('name')]));
5858
$timezone = isset($this->getConfiguration()['timezone'])
5959
? $this->booleanUtils->convert($this->getConfiguration()['timezone'])
60-
: false;
60+
: true;
6161
if (!$timezone) {
6262
$date = new \DateTime($item[$this->getData('name')]);
6363
}

0 commit comments

Comments
 (0)