From 64ad1ac161f19223a7f06fa731dffcba591b0e93 Mon Sep 17 00:00:00 2001 From: CyJaySong Date: Thu, 27 Jul 2023 16:31:09 +0800 Subject: [PATCH] fix String2Time --- convert/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert/time.go b/convert/time.go index 56177104..cda5669f 100644 --- a/convert/time.go +++ b/convert/time.go @@ -87,7 +87,7 @@ func String2Time(s string, originalLocation *time.Location, convertedLocation *t return nil, err } dt = dt.In(convertedLocation) - dt = time.Date(1, 1, 1, dt.Hour(), dt.Minute(), dt.Second(), 0, convertedLocation) + dt = time.Date(0, 1, 1, dt.Hour(), dt.Minute(), dt.Second(), 0, convertedLocation) return &dt, nil } else { i, err := strconv.ParseInt(s, 10, 64)