From 0742fea5540a439d706ea76c037e83da01a2f026 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Sun, 21 Aug 2022 20:58:58 +0200 Subject: [PATCH] Location source: Offset the sun times --- src/modules/SourceLocation.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/SourceLocation.js b/src/modules/SourceLocation.js index b3adb09..99549fe 100644 --- a/src/modules/SourceLocation.js +++ b/src/modules/SourceLocation.js @@ -164,8 +164,9 @@ var SourceLocation = class extends Source { const timeSunrise = solarNoon - haSunrise * 4 / 1440; const timeSunset = solarNoon + haSunrise * 4 / 1440; - const sunrise = timeSunrise * 24; - const sunset = timeSunset * 24; + const offset = 0.4; + const sunrise = timeSunrise * 24 + offset; + const sunset = timeSunset * 24 - offset; this.#suntimes.set(SunTime.SUNRISE, sunrise); this.#suntimes.set(SunTime.SUNSET, sunset);