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 GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -165,6 +165,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

@@ -37,8 +37,9 @@ Timezone* tz;
#define TZ_MX_CENTRAL 21
#define TZ_PAKISTAN 22
#define TZ_BRASILIA 23
#define TZ_AUSTRALIA_WESTERN 24
#define TZ_COUNT 24
#define TZ_COUNT 25
#define TZ_INIT 255
byte tzCurrent = TZ_INIT; //uninitialized
@@ -140,6 +141,10 @@ static const std::pair<TimeChangeRule, TimeChangeRule> TZ_TABLE[] PROGMEM = {
/* TZ_BRASILIA */ {
{Last, Sun, Mar, 1, -180}, //Brasília Standard Time = UTC - 3 hours
{Last, Sun, Mar, 1, -180}
},
/* TZ_AUSTRALIA_WESTERN */ {
{Last, Sun, Mar, 1, 480}, //AWST = UTC + 8 hours
{Last, Sun, Mar, 1, 480} //AWST = UTC + 8 hours (no DST)
}
};