Skip to content

Commit 10cfcda

Browse files
authored
Merge pull request wled#2264 from AK5nowman/Alaskatime
Add AKST/AKDT Time Zone
2 parents 8afaac1 + 3f71d3b commit 10cfcda

File tree

3 files changed

+31
-23
lines changed

3 files changed

+31
-23
lines changed

wled00/data/settings_time.htm

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

wled00/html_settings.h

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -352,29 +352,30 @@ AEST/AEDT</option><option value="12">NZST/NZDT</option><option value="13">
352352
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">
355-
NOVT (Novosibirsk)</option></select><br>UTC offset: <input name="UO"
356-
type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
357-
Current local time is <span class="times">unknown</span>.<br>Latitude (N):
358-
<input name="LT" type="number" min="-66.6" max="66.6" step="0.01">
359-
Longitude (E): <input name="LN" type="number" min="-180" max="180" step="0.01">
360-
<div id="sun" class="times"></div><h3>Clock</h3>Clock Overlay: <select
361-
name="OL" onchange="Cs()"><option value="0" id="cn" selected="selected">None
362-
</option><option value="1" id="ca">Analog Clock</option><option value="2">
363-
Single Digit Clock</option><option value="3" id="cc">Cronixie Clock</option>
364-
</select><br><div id="coc">First LED: <input name="O1" type="number" min="0"
365-
max="255" required> Last LED: <input name="O2" type="number" min="0" max="255"
366-
required><br><div id="cac">12h LED: <input name="OM" type="number" min="0"
367-
max="255" required><br>Show 5min marks: <input type="checkbox" name="O5"><br>
368-
</div>Seconds (as trail): <input type="checkbox" name="OS"><br></div><div
369-
id="ccc">Cronixie Display: <input name="CX" maxlength="6"><br>
370-
Cronixie Backlight: <input type="checkbox" name="CB"><br></div>Countdown Mode:
371-
<input type="checkbox" name="CE"><br>Countdown Goal:<br>Year: 20 <input
372-
name="CY" type="number" min="0" max="99" required> Month: <input name="CI"
373-
type="number" min="1" max="12" required> Day: <input name="CD" type="number"
374-
min="1" max="31" required><br>Hour: <input name="CH" type="number" min="0"
375-
max="23" required> Minute: <input name="CM" type="number" min="0" max="59"
376-
required> Second: <input name="CS" type="number" min="0" max="59" required><br>
377-
<h3>Macro presets</h3><b>Macros have moved!</b><br><i>
355+
NOVT (Novosibirsk)</option><option value="20">AKST/AKDT (Anchorage)</option>
356+
</select><br>UTC offset: <input name="UO" type="number" min="-65500"
357+
max="65500" required> seconds (max. 18 hours)<br>Current local time is <span
358+
class="times">unknown</span>.<br>Latitude (N): <input name="LT" type="number"
359+
min="-66.6" max="66.6" step="0.01"> Longitude (E): <input name="LN"
360+
type="number" min="-180" max="180" step="0.01"><div id="sun" class="times">
361+
</div><h3>Clock</h3>Clock Overlay: <select name="OL" onchange="Cs()"><option
362+
value="0" id="cn" selected="selected">None</option><option value="1" id="ca">
363+
Analog Clock</option><option value="2">Single Digit Clock</option><option
364+
value="3" id="cc">Cronixie Clock</option></select><br><div id="coc">First LED:
365+
<input name="O1" type="number" min="0" max="255" required> Last LED: <input
366+
name="O2" type="number" min="0" max="255" required><br><div id="cac">12h LED:
367+
<input name="OM" type="number" min="0" max="255" required><br>Show 5min marks:
368+
<input type="checkbox" name="O5"><br></div>Seconds (as trail): <input
369+
type="checkbox" name="OS"><br></div><div id="ccc">Cronixie Display: <input
370+
name="CX" maxlength="6"><br>Cronixie Backlight: <input type="checkbox"
371+
name="CB"><br></div>Countdown Mode: <input type="checkbox" name="CE"><br>
372+
Countdown Goal:<br>Year: 20 <input name="CY" type="number" min="0" max="99"
373+
required> Month: <input name="CI" type="number" min="1" max="12" required> Day:
374+
<input name="CD" type="number" min="1" max="31" required><br>Hour: <input
375+
name="CH" type="number" min="0" max="23" required> Minute: <input name="CM"
376+
type="number" min="0" max="59" required> Second: <input name="CS" type="number"
377+
min="0" max="59" required><br><h3>Macro presets</h3><b>Macros have moved!</b>
378+
<br><i>
378379
Presets now also can be used as macros to save both JSON and HTTP API commands.
379380
<br>Just enter the preset id below!</i> <i>
380381
Use 0 for the default action instead of a preset</i><br>Alexa On/Off Preset:

wled00/ntp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Timezone* tz;
3030
#define TZ_AUSTRALIA_SOUTHERN 17
3131
#define TZ_HAWAII 18
3232
#define TZ_NOVOSIBIRSK 19
33+
#define TZ_ANCHORAGE 20
3334
#define TZ_INIT 255
3435

3536
byte tzCurrent = TZ_INIT; //uninitialized
@@ -135,6 +136,11 @@ void updateTimezone() {
135136
tcrStandard = tcrDaylight;
136137
break;
137138
}
139+
case TZ_ANCHORAGE : {
140+
tcrDaylight = {Second, Sun, Mar, 2, -480}; //AKDT = UTC - 8 hours
141+
tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours
142+
break;
143+
}
138144
}
139145

140146
tzCurrent = currentTimezone;

0 commit comments

Comments
 (0)