Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By default, show times in admin grids in the store timezone. #9941

Merged
merged 1 commit into from
Jun 16, 2017

Conversation

AntonEvers
Copy link
Contributor

@AntonEvers AntonEvers commented Jun 14, 2017

Description

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.

Fixed Issues (if relevant)

  1. Incorrect order date in Orders grid #9426: Incorrect order date in Orders grid
  2. ...

Manual testing scenarios

  1. Place and order, write a review, or log in to the website
  2. In the admin, check the order date, review date, or logged in customer grid date
  3. Change the store's timezone on the global level
  4. Verify that the times in step 2 have adapted to the time zone change

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

fixes magento#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.
@okorshenko okorshenko self-assigned this Jun 15, 2017
@okorshenko okorshenko added this to the June 2017 milestone Jun 15, 2017
@magento-team magento-team merged commit 049cc45 into magento:develop Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants