From 3f71d3b250cf65fb3ab14b2d43284d9acb1974dd Mon Sep 17 00:00:00 2001 From: Gregory Schmidt Date: Sun, 10 Oct 2021 19:09:48 -0800 Subject: [PATCH] Add AKST/AKDT --- wled00/data/settings_time.htm | 1 + wled00/html_settings.h | 47 ++++++++++++++++++----------------- wled00/ntp.cpp | 6 +++++ 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/wled00/data/settings_time.htm b/wled00/data/settings_time.htm index a3094b992..f8efd1300 100644 --- a/wled00/data/settings_time.htm +++ b/wled00/data/settings_time.htm @@ -129,6 +129,7 @@ +
UTC offset: seconds (max. 18 hours)
Current local time is unknown.
diff --git a/wled00/html_settings.h b/wled00/html_settings.h index b328d1b1d..c0872be82 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -352,29 +352,30 @@ AEST/AEDT
UTC offset: seconds (max. 18 hours)
-Current local time is unknown.
Latitude (N): - - Longitude (E): -

Clock

Clock Overlay:
First LED: Last LED:
12h LED:
Show 5min marks:
-
Seconds (as trail):
Cronixie Display:
-Cronixie Backlight:
Countdown Mode: -
Countdown Goal:
Year: 20 Month: Day:
Hour: Minute: Second:
-

Macro presets

Macros have moved!
+NOVT (Novosibirsk) +
UTC offset: seconds (max. 18 hours)
Current local time is unknown.
Latitude (N): Longitude (E):
+

Clock

Clock Overlay:
First LED: + Last LED:
12h LED: +
Show 5min marks: +
Seconds (as trail):
Cronixie Display:
Cronixie Backlight:
Countdown Mode:
+Countdown Goal:
Year: 20 Month: Day: +
Hour: Minute: Second:

Macro presets

Macros have moved! +
Presets now also can be used as macros to save both JSON and HTTP API commands.
Just enter the preset id below!
Use 0 for the default action instead of a preset
Alexa On/Off Preset: diff --git a/wled00/ntp.cpp b/wled00/ntp.cpp index c79ff2c1f..045da9562 100644 --- a/wled00/ntp.cpp +++ b/wled00/ntp.cpp @@ -30,6 +30,7 @@ Timezone* tz; #define TZ_AUSTRALIA_SOUTHERN 17 #define TZ_HAWAII 18 #define TZ_NOVOSIBIRSK 19 +#define TZ_ANCHORAGE 20 #define TZ_INIT 255 byte tzCurrent = TZ_INIT; //uninitialized @@ -135,6 +136,11 @@ void updateTimezone() { tcrStandard = tcrDaylight; break; } + case TZ_ANCHORAGE : { + tcrDaylight = {Second, Sun, Mar, 2, -480}; //AKDT = UTC - 8 hours + tcrStandard = {First, Sun, Nov, 2, -540}; //AKST = UTC - 9 hours + break; + } } tzCurrent = currentTimezone;