Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added BRT timezone #4188

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions wled00/data/settings_time.htm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ <h2>Time setup</h2>
<option value="20">AKST/AKDT (Anchorage)</option>
<option value="21">MX-CST</option>
<option value="22">PKT (Pakistan)</option>
<option value="23">BRT (Brasília)</option>
</select><br>
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
Current local time is <span class="times">unknown</span>.<br>
Expand Down
7 changes: 6 additions & 1 deletion wled00/ntp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -135,6 +136,10 @@ static const std::pair<TimeChangeRule, TimeChangeRule> 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}
}
};

Expand Down