From b7226b21ec8cf807e4319ec6bcd85d81cd7ebbc9 Mon Sep 17 00:00:00 2001 From: Mukhtar Akere Date: Mon, 16 Jun 2025 22:41:46 +0100 Subject: [PATCH] added CET timezone --- pkg/debrid/store/cache.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/debrid/store/cache.go b/pkg/debrid/store/cache.go index 5170600..571da9f 100644 --- a/pkg/debrid/store/cache.go +++ b/pkg/debrid/store/cache.go @@ -108,7 +108,14 @@ type Cache struct { func NewDebridCache(dc config.Debrid, client types.Client) *Cache { cfg := config.Get() - cetSc, err := gocron.NewScheduler(gocron.WithLocation(time.UTC)) + cet, err := time.LoadLocation("CET") + if err != nil { + cet, err = time.LoadLocation("Europe/Berlin") // Fallback to Berlin if CET fails + if err != nil { + cet = time.FixedZone("CET", 1*60*60) // Fallback to a fixed CET zone + } + } + cetSc, err := gocron.NewScheduler(gocron.WithLocation(cet)) if err != nil { // If we can't create a CET scheduler, fallback to local time cetSc, _ = gocron.NewScheduler(gocron.WithLocation(time.Local))