diff --git a/sonoff/support_rtc.ino b/sonoff/support_rtc.ino index 5c9f9e2b4..71fe7220c 100644 --- a/sonoff/support_rtc.ino +++ b/sonoff/support_rtc.ino @@ -331,6 +331,11 @@ uint32_t LocalTime(void) return local_time; } +uint32_t UtcTime(void) +{ + return utc_time; +} + uint32_t Midnight(void) { return midnight; diff --git a/sonoff/xdrv_10_rules.ino b/sonoff/xdrv_10_rules.ino index 1e0c57ae6..1dfbb2a58 100644 --- a/sonoff/xdrv_10_rules.ino +++ b/sonoff/xdrv_10_rules.ino @@ -651,6 +651,10 @@ bool findNextVariableValue(char * &pVarname, double &value) value = GetMinutesPastMidnight(); } else if (sVarName.equals(F("UPTIME"))) { value = GetMinutesUptime(); + } else if (sVarName.equals(F("UTCTIME"))) { + value = UtcTime(); + } else if (sVarName.equals(F("LOCALTIME"))) { + value = LocalTime(); #if defined(USE_TIMERS) && defined(USE_SUNRISE) } else if (sVarName.equals(F("SUNRISE"))) { value = GetSunMinutes(0);