File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
app/code/Magento/Fedex/Model Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -1571,12 +1571,9 @@ private function processTrackingDetails(\stdClass $trackInfo)
1571
1571
'progressdetail ' => [],
1572
1572
];
1573
1573
1574
- if (!empty ($ trackInfo ->ShipTimestamp )) {
1575
- // Add default timezone in case if it is not present in string
1576
- if (!preg_match ('/(.*)+(\+[0-9]+:[0-9]+)/ ' , $ trackInfo ->ShipTimestamp )) {
1577
- $ trackInfo ->ShipTimestamp .= '+00:00 ' ;
1578
- }
1579
- $ datetime = \DateTime::createFromFormat (\DateTime::ISO8601 , $ trackInfo ->ShipTimestamp );
1574
+ if (!empty ($ trackInfo ->ShipTimestamp ) &&
1575
+ ($ datetime = \DateTime::createFromFormat (\DateTime::ISO8601 , $ trackInfo ->ShipTimestamp )) !== false
1576
+ ) {
1580
1577
$ result ['shippeddate ' ] = $ datetime ->format ('Y-m-d ' );
1581
1578
}
1582
1579
You can’t perform that action at this time.
0 commit comments