Add PKT timezone (see PR #2840)

This commit is contained in:
Aircoookie 2022-10-19 11:11:25 +02:00
parent b3a29188a2
commit 5c542d60e5
2 changed files with 8 additions and 1 deletions

View File

@ -182,6 +182,7 @@
<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> <option value="21">MX-CST/CDT</option>
<option value="22">PKT (Pakistan)</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

@ -31,7 +31,8 @@ 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_MX_CENTRAL 21
#define TZ_PAKISTAN 22
#define TZ_INIT 255 #define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized byte tzCurrent = TZ_INIT; //uninitialized
@ -147,6 +148,11 @@ void updateTimezone() {
tcrStandard = {Last, Sun, Oct, 2, -360}; //CST = UTC - 6 hours tcrStandard = {Last, Sun, Oct, 2, -360}; //CST = UTC - 6 hours
break; break;
} }
case TZ_PAKISTAN : {
tcrDaylight = {Last, Sun, Mar, 1, 300}; //Pakistan Standard Time = UTC + 5 hours
tcrStandard = tcrDaylight;
break;
}
} }
tzCurrent = currentTimezone; tzCurrent = currentTimezone;