Add AKST/AKDT

This commit is contained in:
Gregory Schmidt 2021-10-10 19:09:48 -08:00
parent 8afaac1e30
commit 3f71d3b250
3 changed files with 31 additions and 23 deletions

View File

@ -129,6 +129,7 @@
<option value="17">ACST/ACDT</option> <option value="17">ACST/ACDT</option>
<option value="18">HST (Hawaii)</option> <option value="18">HST (Hawaii)</option>
<option value="19">NOVT (Novosibirsk)</option> <option value="19">NOVT (Novosibirsk)</option>
<option value="20">AKST/AKDT (Anchorage)</option>
</select><br> </select><br>
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<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> Current local time is <span class="times">unknown</span>.<br>

View File

@ -352,29 +352,30 @@ AEST/AEDT</option><option value="12">NZST/NZDT</option><option value="13">
North Korea</option><option value="14">IST (India)</option><option value="15"> North Korea</option><option value="14">IST (India)</option><option value="15">
CA-Saskatchewan</option><option value="16">ACST</option><option value="17"> CA-Saskatchewan</option><option value="16">ACST</option><option value="17">
ACST/ACDT</option><option value="18">HST (Hawaii)</option><option value="19"> ACST/ACDT</option><option value="18">HST (Hawaii)</option><option value="19">
NOVT (Novosibirsk)</option></select><br>UTC offset: <input name="UO" NOVT (Novosibirsk)</option><option value="20">AKST/AKDT (Anchorage)</option>
type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br> </select><br>UTC offset: <input name="UO" type="number" min="-65500"
Current local time is <span class="times">unknown</span>.<br>Latitude (N): max="65500" required> seconds (max. 18 hours)<br>Current local time is <span
<input name="LT" type="number" min="-66.6" max="66.6" step="0.01"> class="times">unknown</span>.<br>Latitude (N): <input name="LT" type="number"
Longitude (E): <input name="LN" type="number" min="-180" max="180" step="0.01"> min="-66.6" max="66.6" step="0.01"> Longitude (E): <input name="LN"
<div id="sun" class="times"></div><h3>Clock</h3>Clock Overlay: <select type="number" min="-180" max="180" step="0.01"><div id="sun" class="times">
name="OL" onchange="Cs()"><option value="0" id="cn" selected="selected">None </div><h3>Clock</h3>Clock Overlay: <select name="OL" onchange="Cs()"><option
</option><option value="1" id="ca">Analog Clock</option><option value="2"> value="0" id="cn" selected="selected">None</option><option value="1" id="ca">
Single Digit Clock</option><option value="3" id="cc">Cronixie Clock</option> Analog Clock</option><option value="2">Single Digit Clock</option><option
</select><br><div id="coc">First LED: <input name="O1" type="number" min="0" value="3" id="cc">Cronixie Clock</option></select><br><div id="coc">First LED:
max="255" required> Last LED: <input name="O2" type="number" min="0" max="255" <input name="O1" type="number" min="0" max="255" required> Last LED: <input
required><br><div id="cac">12h LED: <input name="OM" type="number" min="0" name="O2" type="number" min="0" max="255" required><br><div id="cac">12h LED:
max="255" required><br>Show 5min marks: <input type="checkbox" name="O5"><br> <input name="OM" type="number" min="0" max="255" required><br>Show 5min marks:
</div>Seconds (as trail): <input type="checkbox" name="OS"><br></div><div <input type="checkbox" name="O5"><br></div>Seconds (as trail): <input
id="ccc">Cronixie Display: <input name="CX" maxlength="6"><br> type="checkbox" name="OS"><br></div><div id="ccc">Cronixie Display: <input
Cronixie Backlight: <input type="checkbox" name="CB"><br></div>Countdown Mode: name="CX" maxlength="6"><br>Cronixie Backlight: <input type="checkbox"
<input type="checkbox" name="CE"><br>Countdown Goal:<br>Year: 20 <input name="CB"><br></div>Countdown Mode: <input type="checkbox" name="CE"><br>
name="CY" type="number" min="0" max="99" required> Month: <input name="CI" Countdown Goal:<br>Year: 20 <input name="CY" type="number" min="0" max="99"
type="number" min="1" max="12" required> Day: <input name="CD" type="number" required> Month: <input name="CI" type="number" min="1" max="12" required> Day:
min="1" max="31" required><br>Hour: <input name="CH" type="number" min="0" <input name="CD" type="number" min="1" max="31" required><br>Hour: <input
max="23" required> Minute: <input name="CM" type="number" min="0" max="59" name="CH" type="number" min="0" max="23" required> Minute: <input name="CM"
required> Second: <input name="CS" type="number" min="0" max="59" required><br> type="number" min="0" max="59" required> Second: <input name="CS" type="number"
<h3>Macro presets</h3><b>Macros have moved!</b><br><i> min="0" max="59" required><br><h3>Macro presets</h3><b>Macros have moved!</b>
<br><i>
Presets now also can be used as macros to save both JSON and HTTP API commands. Presets now also can be used as macros to save both JSON and HTTP API commands.
<br>Just enter the preset id below!</i> <i> <br>Just enter the preset id below!</i> <i>
Use 0 for the default action instead of a preset</i><br>Alexa On/Off Preset: Use 0 for the default action instead of a preset</i><br>Alexa On/Off Preset:

View File

@ -30,6 +30,7 @@ Timezone* tz;
#define TZ_AUSTRALIA_SOUTHERN 17 #define TZ_AUSTRALIA_SOUTHERN 17
#define TZ_HAWAII 18 #define TZ_HAWAII 18
#define TZ_NOVOSIBIRSK 19 #define TZ_NOVOSIBIRSK 19
#define TZ_ANCHORAGE 20
#define TZ_INIT 255 #define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized byte tzCurrent = TZ_INIT; //uninitialized
@ -135,6 +136,11 @@ void updateTimezone() {
tcrStandard = tcrDaylight; tcrStandard = tcrDaylight;
break; break;
} }
case TZ_ANCHORAGE : {
tcrDaylight = {Second, Sun, Mar, 2, -480}; //AKDT = UTC - 8 hours
tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours
break;
}
} }
tzCurrent = currentTimezone; tzCurrent = currentTimezone;