From 07a4d4d98859df55a581a2101fe9bf2114f182cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Garc=C3=ADa=20Veytia=20=28Puerco=29?= Date: Fri, 25 Jun 2021 22:20:16 -0500 Subject: [PATCH] Fix spdx date bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a bug where month and day where on the wrong order in the SPDX document date. Signed-off-by: Adolfo GarcĂ­a Veytia (Puerco) --- pkg/spdx/document.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/spdx/document.go b/pkg/spdx/document.go index 0ffe2306..6bca5f55 100644 --- a/pkg/spdx/document.go +++ b/pkg/spdx/document.go @@ -123,7 +123,7 @@ func (d *Document) Render() (doc string, err error) { var buf bytes.Buffer funcMap := template.FuncMap{ // The name "title" is what the function will be called in the template text. - "dateFormat": func(t time.Time) string { return t.UTC().Format("2006-02-01T15:04:05Z") }, + "dateFormat": func(t time.Time) string { return t.UTC().Format("2006-01-02T15:04:05Z") }, } if d.Name == "" {