Possibly fix timezone thing

This commit is contained in:
Caleb Denio 2021-05-02 15:56:01 -04:00
parent f0f865811a
commit 2903509a87
3 changed files with 8 additions and 6 deletions

View file

@ -15,6 +15,8 @@ func main() {
fmt.Println("Starting Jia…") fmt.Println("Starting Jia…")
config := jia.NewConfig() config := jia.NewConfig()
fmt.Printf("%+v\n", config.Events)
// Start receiving messages // Start receiving messages
fmt.Printf("Listening on port %d\n", config.Port) fmt.Printf("Listening on port %d\n", config.Port)
jia.StartServer(config) jia.StartServer(config)

View file

@ -1,6 +1,6 @@
- name: Test Event - name: Test Event
start: 8:00 May 2, 2021 EDT start: 8:00 May 2, 2021 -0400
end: 7:59 May 3, 2021 EDT end: 7:59 May 3, 2021 -0400
- name: May Counting - name: May Counting
start: 8:00 May 3, 2021 EDT start: 8:00 May 3, 2021 -0400
end: 20:00 May 31, 2021 EDT end: 20:00 May 31, 2021 -0400

View file

@ -53,8 +53,8 @@ func NewConfig() *Config {
} }
for i, event := range events { for i, event := range events {
events[i].StartTime, _ = time.Parse("15:04 Jan 2, 2006 MST", event.StartString) events[i].StartTime, _ = time.Parse("15:04 Jan 2, 2006 -0700", event.StartString)
events[i].EndTime, _ = time.Parse("15:04 Jan 2, 2006 MST", event.EndString) events[i].EndTime, _ = time.Parse("15:04 Jan 2, 2006 -0700", event.EndString)
} }
return &Config{ return &Config{