mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Fixed a new daylight savings sync issue
This commit is contained in:
parent
6b1533f852
commit
0b5f1e13b8
@ -282,6 +282,17 @@ class ecobee extends external_api {
|
||||
$this->log_mysql($curl_response, true);
|
||||
}
|
||||
throw new cora\exception('No thermostats found.', 10511, false, null, false);
|
||||
} else if (
|
||||
isset($response['status']['message']) === true &&
|
||||
stripos($response['status']['message'], 'Processing error.') !== false
|
||||
) {
|
||||
// Processing error. Generic error...this started happening in August
|
||||
// 2024 when attempting to sync any date range that included
|
||||
// the "missing hour" from daylight savings.
|
||||
if($this::$log_mysql !== 'all') {
|
||||
$this->log_mysql($curl_response, true);
|
||||
}
|
||||
throw new cora\exception('Generic processing error.', 10512, false, null, false);
|
||||
}
|
||||
}
|
||||
else if (isset($response['status']) === true && $response['status']['code'] !== 0) {
|
||||
|
@ -405,6 +405,12 @@ class runtime extends cora\api {
|
||||
strtotime('-1 hour', $begin),
|
||||
strtotime('+1 hour', $end)
|
||||
);
|
||||
} else if($e->getCode() === 10512) {
|
||||
// Processing error. Just pretend it worked and move on.
|
||||
return [
|
||||
'data_begin' => $begin,
|
||||
'data_end' => $end
|
||||
];
|
||||
} else {
|
||||
throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user