From 6da8290c043dc6678bdf37e5638e472511e32973 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Thu, 26 Sep 2024 22:16:01 +0100 Subject: [PATCH] Allow for internal time data debug. --- internal/elements.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/elements.go b/internal/elements.go index f380573..d14955f 100644 --- a/internal/elements.go +++ b/internal/elements.go @@ -1,6 +1,7 @@ package internal import ( + "encoding/base64" "encoding/xml" "errors" "fmt" @@ -353,7 +354,7 @@ type Time time.Time func (t *Time) UnmarshalText(b []byte) error { tt, err := http.ParseTime(string(b)) if err != nil { - return err + return errors.Join(err, errors.New("time_data : "+base64.StdEncoding.EncodeToString(b))) } *t = Time(tt) return nil