Skip to content

Commit 2bdaf53

Browse files
authored
Merge pull request wled#2311 from underritoSR/master
Add MX-CST/CDT Time Zone
2 parents 7e1920d + 46e7db6 commit 2bdaf53

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

wled00/data/settings_time.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ <h2>Time setup</h2>
130130
<option value="18">HST (Hawaii)</option>
131131
<option value="19">NOVT (Novosibirsk)</option>
132132
<option value="20">AKST/AKDT (Anchorage)</option>
133+
<option value="21">MX-CST/CDT</option>
133134
</select><br>
134135
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
135136
Current local time is <span class="times">unknown</span>.<br>

wled00/html_settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ North Korea</option><option value="14">IST (India)</option><option value="15">
353353
CA-Saskatchewan</option><option value="16">ACST</option><option value="17">
354354
ACST/ACDT</option><option value="18">HST (Hawaii)</option><option value="19">
355355
NOVT (Novosibirsk)</option><option value="20">AKST/AKDT (Anchorage)</option>
356+
<option value="21">MX-CST/CDT</option>
356357
</select><br>UTC offset: <input name="UO" type="number" min="-65500"
357358
max="65500" required> seconds (max. 18 hours)<br>Current local time is <span
358359
class="times">unknown</span>.<br>Latitude (N): <input name="LT" type="number"

wled00/ntp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Timezone* tz;
3131
#define TZ_HAWAII 18
3232
#define TZ_NOVOSIBIRSK 19
3333
#define TZ_ANCHORAGE 20
34+
#define TZ_MX_CENTRAL 21
3435
#define TZ_INIT 255
3536

3637
byte tzCurrent = TZ_INIT; //uninitialized
@@ -141,6 +142,11 @@ void updateTimezone() {
141142
tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours
142143
break;
143144
}
145+
case TZ_MX_CENTRAL : {
146+
tcrDaylight = {First, Sun, Apr, 2, -300}; //CDT = UTC - 5 hours
147+
tcrStandard = {Last, Sun, Oct, 2, -360}; //CST = UTC - 6 hours
148+
break;
149+
}
144150
}
145151

146152
tzCurrent = currentTimezone;

0 commit comments

Comments
 (0)