From 5c542d60e56d3cc1f0a054430d1c0082ff5983c0 Mon Sep 17 00:00:00 2001 From: Aircoookie Date: Wed, 19 Oct 2022 11:11:25 +0200 Subject: [PATCH] Add PKT timezone (see PR #2840) --- wled00/data/settings_time.htm | 1 + wled00/ntp.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wled00/data/settings_time.htm b/wled00/data/settings_time.htm index a3a72954..d6d7a052 100644 --- a/wled00/data/settings_time.htm +++ b/wled00/data/settings_time.htm @@ -182,6 +182,7 @@ +
UTC offset: seconds (max. 18 hours)
Current local time is unknown.
diff --git a/wled00/ntp.cpp b/wled00/ntp.cpp index 0c42cd99..02fe8adc 100644 --- a/wled00/ntp.cpp +++ b/wled00/ntp.cpp @@ -31,7 +31,8 @@ Timezone* tz; #define TZ_HAWAII 18 #define TZ_NOVOSIBIRSK 19 #define TZ_ANCHORAGE 20 -#define TZ_MX_CENTRAL 21 +#define TZ_MX_CENTRAL 21 +#define TZ_PAKISTAN 22 #define TZ_INIT 255 byte tzCurrent = TZ_INIT; //uninitialized @@ -147,6 +148,11 @@ void updateTimezone() { tcrStandard = {Last, Sun, Oct, 2, -360}; //CST = UTC - 6 hours break; } + case TZ_PAKISTAN : { + tcrDaylight = {Last, Sun, Mar, 1, 300}; //Pakistan Standard Time = UTC + 5 hours + tcrStandard = tcrDaylight; + break; + } } tzCurrent = currentTimezone;