From 3ea1d4542ac51d5de916cfd2707e6c9ceb65f469 Mon Sep 17 00:00:00 2001 From: Todd Trimble Date: Sun, 11 Oct 2020 13:05:45 -0400 Subject: [PATCH 1/2] Blank import tzdata to fix bug on Windows host --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 970c3e95..80e96ec9 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,8 @@ import ( "log" "os" + _ "time/tzdata" + "github.com/logrusorgru/aurora" "github.com/olebedev/config" "github.com/pkg/profile" From 65a9894bbaa6c79a32315e22831120de8ff6d833 Mon Sep 17 00:00:00 2001 From: Todd Trimble Date: Sun, 11 Oct 2020 19:35:31 -0400 Subject: [PATCH 2/2] Explain time/tzdata import with comment --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 80e96ec9..40c65452 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,10 @@ import ( "log" "os" + // Blank import of tzdata embeds the timezone database to allow Windows hosts to find timezone + // information even if the timezone database is not available on the local system. See release + // notes at https://golang.org/doc/go1.15#time/tzdata for details. This prevents "no timezone + // data available" errors in clocks module. _ "time/tzdata" "github.com/logrusorgru/aurora"