Skip to content

Commit 1a3f946

Browse files
committed
MAGETWO-58516: Product catalog Import/export – Date & Timezone issue. Other fields.
1 parent f86925f commit 1a3f946

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,13 @@ public function testSaveDatetimeAttribute()
387387
);
388388
$productAfterImport->load($productBeforeImport->getId());
389389
$this->assertEquals(
390-
@strtotime($row['news_from_date']),
390+
@strtotime(date('m/d/Y', @strtotime($row['news_from_date']))),
391391
@strtotime($productAfterImport->getNewsFromDate())
392392
);
393+
$this->assertEquals(
394+
@strtotime($row['news_to_date']),
395+
@strtotime($productAfterImport->getNewsToDate())
396+
);
393397
unset($productAfterImport);
394398
}
395399
unset($productsBeforeImport, $product);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sku,news_from_date
2-
simple1,"1/1/2015 20:00"
3-
simple2,"10/8/2012 23:58"
4-
simple3,"12/31/1998 17:30"
1+
sku,news_from_date,news_to_date
2+
simple1,"1/1/2015 20:00","1/2/2015"
3+
simple2,"10/8/2012 23:58","1/3/2015"
4+
simple3,"12/31/1998 17:30","1/4/2015"

0 commit comments

Comments
 (0)