Fix USPS current status date/time showing as request date/time
This commit is contained in:
parent
1b9b0b3644
commit
0b3eec53e5
@ -16,6 +16,9 @@ try {
|
||||
|
||||
$trackinginfo = Tracking::track($code, $carrier);
|
||||
} catch (TrackingException $ex) {
|
||||
if (env("debugmode", false)) {
|
||||
echo $ex->getTraceAsString();
|
||||
}
|
||||
$output = [
|
||||
"status" => "ERROR",
|
||||
"msg" => $ex->getMessage()
|
||||
|
@ -122,7 +122,9 @@ class TrackingInfo {
|
||||
"current" => [
|
||||
"status" => "UNKNOWN",
|
||||
"details" => "No tracking information found.",
|
||||
"date" => time(),
|
||||
"datetime" => date("Y-m-d\TH:i:s", time()),
|
||||
"nicetime" => date("F j g:i a", time()),
|
||||
"containerscan" => false,
|
||||
"location" => [
|
||||
"street" => "",
|
||||
"city" => "",
|
||||
|
@ -57,7 +57,7 @@ class Tracking_USPS {
|
||||
$current_status = new TrackingEntry(
|
||||
TrackingStatus::USPSEventCodeToStatus($trackinfo->TrackSummary->EventCode),
|
||||
($trackinfo->StatusSummary ?? "Unknown") . (TrackingStatus::USPSEventCodeToStatus($trackinfo->TrackSummary->EventCode) == TrackingStatus::TRACKING_STATUS_UNKNOWN ? " " . $trackinfo->TrackSummary->EventCode : ""),
|
||||
$trackinfo->TrackSummary["EventDate"] . " " . $trackinfo->TrackSummary["EventTime"],
|
||||
$trackinfo->TrackSummary->EventDate . " " . $trackinfo->TrackSummary->EventTime,
|
||||
null,
|
||||
TrackingStatus::isUSPSEventCodeContainerScan($trackinfo->TrackSummary->EventCode)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user