File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source
lib/internal/Magento/Framework/Stdlib/DateTime/Filter Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 12
12
* Class Date.
13
13
*
14
14
* 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)
16
16
*/
17
17
class Date extends DataSource
18
18
{
Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface
37
37
*
38
38
* @param string $value
39
39
* @return string
40
- * @throws LocalizedException
40
+ * @throws \Exception
41
41
*/
42
42
public function filter ($ value )
43
43
{
44
44
try {
45
- $ value = new \DateTime ($ value );
46
- return $ value ->format ('Y-m-d H:i:s ' );
45
+ $ dateTime = new \DateTime ($ value );
46
+ return $ dateTime ->format ('Y-m-d H:i:s ' );
47
47
} catch (\Exception $ e ) {
48
- throw new \Exception (' Invalid input datetime format ' );
48
+ throw new \Exception (" Invalid input datetime format of value ' $ value ' " , $ e -> getCode (), $ e );
49
49
}
50
50
}
51
51
}
You can’t perform that action at this time.
0 commit comments