From 50917d6f5c23c7bffdc2ff41ad11afed95f00bf7 Mon Sep 17 00:00:00 2001 From: Peng Jiahui <46921893+Alancere@users.noreply.github.com> Date: Fri, 31 May 2024 10:35:42 +0800 Subject: [PATCH] fix generator issue tool (#22897) * fix parse time * use time * revert * fix --- eng/tools/generator/cmd/issue/request/request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/tools/generator/cmd/issue/request/request.go b/eng/tools/generator/cmd/issue/request/request.go index fafe93792df3..350b12722719 100644 --- a/eng/tools/generator/cmd/issue/request/request.go +++ b/eng/tools/generator/cmd/issue/request/request.go @@ -107,8 +107,8 @@ func NewReleaseRequestIssue(issue github.Issue) (*ReleaseRequestIssue, error) { }) // get release date - targetDate := regexp.MustCompile(`\d*-\d*-\d*`).FindString(contents[releaseDateKeyword]) - releaseDate, err := time.Parse("2006-01-02", targetDate) + targetDate := regexp.MustCompile(`\d+\/\d+\/\d+`).FindString(contents[releaseDateKeyword]) + releaseDate, err := time.Parse("1/2/2006", targetDate) if err != nil { releaseDate = time.Now() }