From 37f32ab197dac8399e2f2b302992344071094e7c Mon Sep 17 00:00:00 2001
From: Luis <84397555+LuisFadini@users.noreply.github.com>
Date: Sat, 12 Oct 2024 10:56:40 -0300
Subject: [PATCH] Added BRT timezone
---
wled00/data/settings_time.htm | 1 +
wled00/ntp.cpp | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/wled00/data/settings_time.htm b/wled00/data/settings_time.htm
index 52f79eb7df..df054f4174 100644
--- a/wled00/data/settings_time.htm
+++ b/wled00/data/settings_time.htm
@@ -156,6 +156,7 @@
Time setup
+
UTC offset: seconds (max. 18 hours)
Current local time is unknown.
diff --git a/wled00/ntp.cpp b/wled00/ntp.cpp
index 7b7dac96e2..8d44e634ec 100644
--- a/wled00/ntp.cpp
+++ b/wled00/ntp.cpp
@@ -36,8 +36,9 @@ Timezone* tz;
#define TZ_ANCHORAGE 20
#define TZ_MX_CENTRAL 21
#define TZ_PAKISTAN 22
+#define TZ_BRASILIA 23
-#define TZ_COUNT 23
+#define TZ_COUNT 24
#define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized
@@ -135,6 +136,10 @@ static const std::pair TZ_TABLE[] PROGMEM = {
/* TZ_PAKISTAN */ {
{Last, Sun, Mar, 1, 300}, //Pakistan Standard Time = UTC + 5 hours
{Last, Sun, Mar, 1, 300}
+ },
+ /* TZ_BRASILIA */ {
+ {Last, Sun, Mar, 1, -180}, //BrasÃlia Standard Time = UTC - 3 hours
+ {Last, Sun, Mar, 1, -180}
}
};