From 5916c9e5e51541b9e76dc6d59e2d16068b848a7f Mon Sep 17 00:00:00 2001 From: maru Date: Wed, 17 Apr 2024 19:03:25 -0400 Subject: [PATCH] Use UTC for cron --- api/daily/common.go | 2 +- api/stats.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/daily/common.go b/api/daily/common.go index 9f54566..c5620d9 100644 --- a/api/daily/common.go +++ b/api/daily/common.go @@ -17,7 +17,7 @@ import ( const secondsPerDay = 60 * 60 * 24 var ( - scheduler = cron.New() + scheduler = cron.New(cron.WithLocation(time.UTC)) secret []byte ) diff --git a/api/stats.go b/api/stats.go index 10f5bb7..121b9cc 100644 --- a/api/stats.go +++ b/api/stats.go @@ -2,13 +2,14 @@ package api import ( "log" + "time" "github.com/pagefaultgames/pokerogue-server/db" "github.com/robfig/cron/v3" ) var ( - scheduler = cron.New() + scheduler = cron.New(cron.WithLocation(time.UTC)) playerCount int battleCount int classicSessionCount int