Skip to content

Commit

Permalink
Merge pull request Aircoookie#4188 from LuisFadini/0_15_brt_timezone
Browse files Browse the repository at this point in the history
Added BRT timezone
  • Loading branch information
softhack007 committed Nov 26, 2024
1 parent 12ef7cb commit 827cf87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions wled00/data/settings_time.htm
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,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
6 changes: 6 additions & 0 deletions wled00/ntp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Timezone* tz = nullptr;
#define TZ_ANCHORAGE 20
#define TZ_MX_CENTRAL 21
#define TZ_PAKISTAN 22
#define TZ_BRASILIA 23
#define TZ_INIT 255

byte tzCurrent = TZ_INIT; //uninitialized
Expand Down Expand Up @@ -168,6 +169,11 @@ void updateTimezone() {
tcrStandard = tcrDaylight;
break;
}
case TZ_BRASILIA : {
tcrDaylight = {Last, Sun, Mar, 1, -180}; //Brasília Standard Time = UTC - 3 hours
tcrStandard = tcrDaylight;
break;
}
}

tzCurrent = currentTimezone;
Expand Down

0 comments on commit 827cf87

Please sign in to comment.