Fix timer offset -00:00

Fix timer offset -00:00 causing 12:00 hour offset (#3923)
This commit is contained in:
Theo Arends 2018-09-30 17:52:41 +02:00
parent 191df17b13
commit b9b6d132f5
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* Add command RGBWWTable to support color calibration (#3933) * Add command RGBWWTable to support color calibration (#3933)
* Add support for Michael Haustein ESP Switch * Add support for Michael Haustein ESP Switch
* Add support for EXS Relay V5.0 (#3810) * Add support for EXS Relay V5.0 (#3810)
* Fix timer offset -00:00 causing 12:00 hour offset (#3923)
* *
* 6.2.1.9 20180928 * 6.2.1.9 20180928
* Add Apparent Power and Reactive Power to Energy Monitoring devices (#251) * Add Apparent Power and Reactive Power to Energy Monitoring devices (#251)

View File

@ -194,7 +194,7 @@ void ApplyTimerOffsets(Timer *duskdawn)
// apply offsets, check for over- and underflows // apply offsets, check for over- and underflows
uint16_t timeBuffer; uint16_t timeBuffer;
if ((uint16_t)stored.time > 720) { if ((uint16_t)stored.time > 719) {
// negative offset, time after 12:00 // negative offset, time after 12:00
timeBuffer = (uint16_t)stored.time - 720; timeBuffer = (uint16_t)stored.time - 720;
// check for underflow // check for underflow