From 39a0adb091459260795f33d9a319245064c074f9 Mon Sep 17 00:00:00 2001 From: "Mr.Li" Date: Thu, 4 May 2023 17:10:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/cmd/uitls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cmd/uitls.go b/cmd/cmd/uitls.go index 0c3d132..766a4e5 100644 --- a/cmd/cmd/uitls.go +++ b/cmd/cmd/uitls.go @@ -20,7 +20,7 @@ func ParseFlagsDateTime(set *flag.FlagSet, key string) (*time.Time, error) { if err != nil { return nil, fmt.Errorf("获取参数异常:%w", err) } - beginTime, err := time.Parse("2006-01-02 15:04:05", val) + beginTime, err := time.ParseInLocation("2006-01-02 15:04:05", val, time.Local) if err != nil { return nil, fmt.Errorf("不是有效的时间格式:%w", err) }