From 0e92c9d4bcf6c3fb422493cd6b44eeced1219c06 Mon Sep 17 00:00:00 2001 From: horus Date: Sat, 10 Oct 2020 04:10:12 +0200 Subject: bugfix --- app/Libraries/Zeitumstellung.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/Libraries') diff --git a/app/Libraries/Zeitumstellung.php b/app/Libraries/Zeitumstellung.php index 42b8415..10bc4cb 100644 --- a/app/Libraries/Zeitumstellung.php +++ b/app/Libraries/Zeitumstellung.php @@ -6,6 +6,8 @@ use Carbon\Carbon; class Zeitumstellung { + // Sommerzeit | Winterzeit + public $season; // full date of the next time change public $date; public $dateText; @@ -51,6 +53,8 @@ class Zeitumstellung { if ( $this->now->lte($this->tc_march) ){ # next time change is in march this year, (last sunday in march) + $this->season = "Sommerzeit"; + $this->date = $this->tc_march; $this->description = 'Die Uhr wird von 2 Uhr auf 3 Uhr vorgestellt, sodass wir 1 Stunde weniger schlafen.'; $this->descriptionHTML = 'Die Uhr wird von 2 Uhr auf 3 Uhr vorgestellt, sodass wir 1 Stunde weniger schlafen.'; @@ -67,6 +71,8 @@ class Zeitumstellung { } else { # next time change is in october this year, (last sunday in october) + $this->season = "Winterzeit"; + $this->date = $this->tc_oct; $this->description = 'Die Uhr wird von 3 Uhr auf 2 Uhr zurückgestellt, sodass wir 1 Stunde länger schlafen.'; $this->descriptionHTML = 'Die Uhr wird von 3 Uhr auf 2 Uhr zurückgestellt, sodass wir 1 Stunde länger schlafen.'; -- cgit v1.2.3