Skip to content

Commit f735e3d

Browse files
author
Anton Evers
authored
Bug fix, prevent displaying 0000-00-00 00:00:00 as anything else in admin grids
1 parent d48faba commit f735e3d

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ public function prepareDataSource(array $dataSource)
5353
{
5454
if (isset($dataSource['data']['items'])) {
5555
foreach ($dataSource['data']['items'] as & $item) {
56-
if (isset($item[$this->getData('name')])) {
56+
if (isset($item[$this->getData('name')])
57+
&& $item[$this->getData('name')] !== "0000-00-00 00:00:00"
58+
) {
5759
$date = $this->timezone->date(new \DateTime($item[$this->getData('name')]));
5860
$timezone = isset($this->getConfiguration()['timezone'])
5961
? $this->booleanUtils->convert($this->getConfiguration()['timezone'])

0 commit comments

Comments
 (0)