Merge pull request #2311 from underritoSR/master

Add MX-CST/CDT Time Zone
This commit is contained in:
Christian Schwinne 2021-11-03 09:14:22 +01:00 committed by GitHub
commit 2bdaf53ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -130,6 +130,7 @@
<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> <option value="20">AKST/AKDT (Anchorage)</option>
<option value="21">MX-CST/CDT</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

@ -353,6 +353,7 @@ 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><option value="20">AKST/AKDT (Anchorage)</option> NOVT (Novosibirsk)</option><option value="20">AKST/AKDT (Anchorage)</option>
<option value="21">MX-CST/CDT</option>
</select><br>UTC offset: <input name="UO" type="number" min="-65500" </select><br>UTC offset: <input name="UO" type="number" min="-65500"
max="65500" required> seconds (max. 18 hours)<br>Current local time is <span max="65500" required> seconds (max. 18 hours)<br>Current local time is <span
class="times">unknown</span>.<br>Latitude (N): <input name="LT" type="number" class="times">unknown</span>.<br>Latitude (N): <input name="LT" type="number"

View File

@ -31,6 +31,7 @@ Timezone* tz;
#define TZ_HAWAII 18 #define TZ_HAWAII 18
#define TZ_NOVOSIBIRSK 19 #define TZ_NOVOSIBIRSK 19
#define TZ_ANCHORAGE 20 #define TZ_ANCHORAGE 20
#define TZ_MX_CENTRAL 21
#define TZ_INIT 255 #define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized byte tzCurrent = TZ_INIT; //uninitialized
@ -141,6 +142,11 @@ void updateTimezone() {
tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours
break; break;
} }
case TZ_MX_CENTRAL : {
tcrDaylight = {First, Sun, Apr, 2, -300}; //CDT = UTC - 5 hours
tcrStandard = {Last, Sun, Oct, 2, -360}; //CST = UTC - 6 hours
break;
}
} }
tzCurrent = currentTimezone; tzCurrent = currentTimezone;