From 5f9350831dbb18f2dcaa7e66faa486ebe63d9cf7 Mon Sep 17 00:00:00 2001 From: PtrO Date: Tue, 10 Dec 2019 18:09:59 +0100 Subject: [PATCH] 7.1.2.4 20191209 xdrv_09_timers.ino fix 12hr early Sunset/Sunrise due negative zero time. --- tasmota/xdrv_09_timers.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_09_timers.ino b/tasmota/xdrv_09_timers.ino index b00b5ba24..db1cde97e 100644 --- a/tasmota/xdrv_09_timers.ino +++ b/tasmota/xdrv_09_timers.ino @@ -583,7 +583,7 @@ const char HTTP_TIMER_SCRIPT3[] PROGMEM = "if(m==0){s|=l;}" // Get time #ifdef USE_SUNRISE "if((m==1)||(m==2)){" - "if(qs('#dr').selectedIndex>0){l+=720;}" // If negative offset, add 12h to given offset time + "if(qs('#dr').selectedIndex>0){if(l>0){l+=720;}}" // If negative offset and delta-time > 0, add 12h to given offset time "s|=l&0x7FF;" // Save offset instead of time "}" #endif