Skip to content

Commit 462127f

Browse files
authored
Merge pull request #117 from firegento/sprankhub-patch-1
Fixe datetime attributes
2 parents 711b7f1 + 9a0a096 commit 462127f

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)