Merge pull request #5273 from nomis52/awst

Add support for Australian Western Time
This commit is contained in:
Will Tatam
2026-01-07 18:21:47 +00:00
committed by Frank
parent ce56755416
commit 69fa3378a4
2 changed files with 7 additions and 0 deletions

View File

@@ -183,6 +183,7 @@
<option value="21">MX-CST</option>
<option value="22">PKT (Pakistan)</option>
<option value="23">BRT (Brasília)</option>
<option value="24">AWST (Perth)</option>
</select><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>

View File

@@ -49,6 +49,8 @@ Timezone* tz = nullptr;
#define TZ_MX_CENTRAL 21
#define TZ_PAKISTAN 22
#define TZ_BRASILIA 23
#define TZ_AUSTRALIA_WESTERN 24
#define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized
@@ -174,6 +176,10 @@ void updateTimezone() {
tcrStandard = tcrDaylight;
break;
}
case TZ_AUSTRALIA_WESTERN : {
tcrDaylight = {Last, Sun, Mar, 1, 480}; //AWST = UTC + 8 hours
tcrStandard = tcrDaylight; //AWST = UTC + 8 hours (no DST)
break;
}
tzCurrent = currentTimezone;