Skip to content

Commit 5e19956

Browse files
author
Olga Kopylova
committed
MAGETWO-51881: Widget of type Catalog Events Carousel is not displayed in page
- added details to exception caused by incorrect date format
1 parent a455e37 commit 5e19956

File tree

2 files changed

+2
-2
lines changed
  • dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source
  • lib/internal/Magento/Framework/Stdlib/DateTime/Filter

2 files changed

+2
-2
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Class Date.
1313
*
1414
* Data keys:
15-
* - pattern (Format a local time/date with delta, e.g. 'm-d-Y -3 days' = current day - 3 days)
15+
* - pattern (Format a local time/date with delta, e.g. 'm/d/Y -3 days' = current day - 3 days)
1616
*/
1717
class Date extends DataSource
1818
{

lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function filter($value)
4545
$dateTime = new \DateTime($value);
4646
return $dateTime->format('Y-m-d H:i:s');
4747
} catch (\Exception $e) {
48-
throw new \Exception((string)__("Invalid input datetime format of value '%1': '%2'", $value, $e->getMessage()));
48+
throw new \Exception("Invalid input datetime format of value '$value'", $e->getCode(), $e);
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)