From 2903509a87aafc08fb59707b1983053d9dda9e84 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Sun, 2 May 2021 15:56:01 -0400 Subject: [PATCH] Possibly fix timezone thing --- cmd/jia.go | 2 ++ events.yaml | 8 ++++---- pkg/jia/config.go | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/jia.go b/cmd/jia.go index ea4a131..06363af 100644 --- a/cmd/jia.go +++ b/cmd/jia.go @@ -15,6 +15,8 @@ func main() { fmt.Println("Starting Jia…") config := jia.NewConfig() + fmt.Printf("%+v\n", config.Events) + // Start receiving messages fmt.Printf("Listening on port %d\n", config.Port) jia.StartServer(config) diff --git a/events.yaml b/events.yaml index 226ca6f..e1af9d1 100644 --- a/events.yaml +++ b/events.yaml @@ -1,6 +1,6 @@ - name: Test Event - start: 8:00 May 2, 2021 EDT - end: 7:59 May 3, 2021 EDT + start: 8:00 May 2, 2021 -0400 + end: 7:59 May 3, 2021 -0400 - name: May Counting - start: 8:00 May 3, 2021 EDT - end: 20:00 May 31, 2021 EDT + start: 8:00 May 3, 2021 -0400 + end: 20:00 May 31, 2021 -0400 diff --git a/pkg/jia/config.go b/pkg/jia/config.go index 15d0055..f4bec9d 100644 --- a/pkg/jia/config.go +++ b/pkg/jia/config.go @@ -53,8 +53,8 @@ func NewConfig() *Config { } for i, event := range events { - events[i].StartTime, _ = time.Parse("15:04 Jan 2, 2006 MST", event.StartString) - events[i].EndTime, _ = time.Parse("15:04 Jan 2, 2006 MST", event.EndString) + events[i].StartTime, _ = time.Parse("15:04 Jan 2, 2006 -0700", event.StartString) + events[i].EndTime, _ = time.Parse("15:04 Jan 2, 2006 -0700", event.EndString) } return &Config{