Skip to content

Commit 9a0a096

Browse files
authored
Fixe datetime attributes
1 parent 711b7f1 commit 9a0a096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/Import/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ protected function saveCategories()
12191219
$attrValue = $attrParams['options'][strtolower($attrValue)];
12201220
}
12211221
} elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
1222-
$attrValue = (new \DateTime(strtotime($attrValue)))->format(DateTime::DATETIME_PHP_FORMAT);
1222+
$attrValue = (new \DateTime($attrValue))->format(DateTime::DATETIME_PHP_FORMAT);
12231223
} elseif ($backModel && 'available_sort_by' != $attrCode) {
12241224
$attribute->getBackend()->beforeSave($category);
12251225
$attrValue = $category->getData($attribute->getAttributeCode());

0 commit comments

Comments
 (0)