From 80c143721bf5ad5cc59b48964105b6f21350c6fa Mon Sep 17 00:00:00 2001 From: Brandon Johnson Date: Tue, 12 Oct 2021 14:19:36 -0400 Subject: [PATCH] Remove timezone database suggestion --- operator/builtin/parser/syslog/syslog.go | 2 +- operator/helper/time.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/operator/builtin/parser/syslog/syslog.go b/operator/builtin/parser/syslog/syslog.go index bd6c7b2e..add04f31 100644 --- a/operator/builtin/parser/syslog/syslog.go +++ b/operator/builtin/parser/syslog/syslog.go @@ -75,7 +75,7 @@ func (c SyslogParserConfig) Build(context operator.BuildContext) ([]operator.Ope location, err := time.LoadLocation(c.Location) if err != nil { - return nil, fmt.Errorf("failed to load location %s (is the timezone database installed?): %w", c.Location, err) + return nil, fmt.Errorf("failed to load location %s: %w", c.Location, err) } syslogParser := &SyslogParser{ diff --git a/operator/helper/time.go b/operator/helper/time.go index 746cbee8..71adff24 100644 --- a/operator/helper/time.go +++ b/operator/helper/time.go @@ -115,7 +115,7 @@ func (t *TimeParser) setLocation() error { // If "location" is specified, it must be in the local timezone database loc, err := time.LoadLocation(t.Location) if err != nil { - return fmt.Errorf("failed to load location %s (is the timezone database installed?): %w", t.Location, err) + return fmt.Errorf("failed to load location %s: %w", t.Location, err) } t.location = loc return nil @@ -198,7 +198,7 @@ func (t *TimeParser) parseGotime(value interface{}) (time.Time, error) { loc, locErr := time.LoadLocation(zone) if locErr != nil { // can't correct offset, just return what we have - return result, fmt.Errorf("failed to load location %s (is the timezone database installed?): %w", zone, locErr) + return result, fmt.Errorf("failed to load location %s: %w", zone, locErr) } // Reparse the timestamp, with the location