diff --git a/docs/source/Reference/SystemVariable.rst b/docs/source/Reference/SystemVariable.rst index 316280453..0663b3de6 100644 --- a/docs/source/Reference/SystemVariable.rst +++ b/docs/source/Reference/SystemVariable.rst @@ -187,7 +187,7 @@ More uses of these system variables can be seen in the rules section and formula - Yes * - ``%localunixtime%`` - 1748813303 - - Local Unix time (seconds since epoch, 1970-01-01 00:00:00) with Time-zone and DST applied. (Added: 2025/06/01) + - Local Unix time (seconds since epoch, 1970-01-01 00:00:00) with Time-zone and DST applied. (Added: 2025/06/01, not available in Limited builds) Example: 1748813303 = 2025-06-01 21:28:32 - Yes diff --git a/src/src/Helpers/SystemVariables.cpp b/src/src/Helpers/SystemVariables.cpp index 83f58642b..dbb4a9f0f 100644 --- a/src/src/Helpers/SystemVariables.cpp +++ b/src/src/Helpers/SystemVariables.cpp @@ -238,7 +238,9 @@ String SystemVariables::getSystemVariable(SystemVariables::Enum enumval) { case UNIXDAY: intvalue = node_time.getUnixTime() / 86400; break; case UNIXDAY_SEC: intvalue = node_time.getUnixTime() % 86400; break; case UNIXTIME: return String(node_time.getUnixTime()); + #ifndef LIMIT_BUILD_SIZE case LOCALUNIXTIME: return String(node_time.getLocalUnixTime()); + #endif // ifndef LIMIT_BUILD_SIZE case UPTIME: intvalue = getUptimeMinutes(); break; case UPTIME_MS: return ull2String(getMicros64() / 1000); #if FEATURE_ADC_VCC @@ -664,7 +666,9 @@ const __FlashStringHelper * SystemVariables::toFlashString(SystemVariables::Enum case Enum::UNIXDAY: return F("unixday"); case Enum::UNIXDAY_SEC: return F("unixday_sec"); case Enum::UNIXTIME: return F("unixtime"); + #ifndef LIMIT_BUILD_SIZE case Enum::LOCALUNIXTIME: return F("localunixtime"); + #endif // ifndef LIMIT_BUILD_SIZE case Enum::UPTIME: return F("uptime"); case Enum::UPTIME_MS: return F("uptime_ms"); case Enum::VCC: return F("vcc"); diff --git a/src/src/Helpers/SystemVariables.h b/src/src/Helpers/SystemVariables.h index 12fed3b34..ab13b8b7d 100644 --- a/src/src/Helpers/SystemVariables.h +++ b/src/src/Helpers/SystemVariables.h @@ -116,7 +116,9 @@ public: UNIXDAY, UNIXDAY_SEC, UNIXTIME, + #ifndef LIMIT_BUILD_SIZE LOCALUNIXTIME, + #endif // ifndef LIMIT_BUILD_SIZE UPTIME, UPTIME_MS, VCC, diff --git a/src/src/WebServer/SysVarPage.cpp b/src/src/WebServer/SysVarPage.cpp index 1f10d0f57..22728950d 100644 --- a/src/src/WebServer/SysVarPage.cpp +++ b/src/src/WebServer/SysVarPage.cpp @@ -201,7 +201,9 @@ void handle_sysvars() { SystemVariables::UPTIME, SystemVariables::UPTIME_MS, SystemVariables::UNIXTIME, + #ifndef LIMIT_BUILD_SIZE SystemVariables::LOCALUNIXTIME, + #endif // ifndef LIMIT_BUILD_SIZE SystemVariables::UNIXDAY, SystemVariables::UNIXDAY_SEC, };