From c7d970a91672defadf550730f1b09d309e78143a Mon Sep 17 00:00:00 2001 From: Peleus <245629560@qq.com> Date: Sat, 23 Dec 2023 22:21:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- creator.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/creator.go b/creator.go index fd90e28..27eab7f 100755 --- a/creator.go +++ b/creator.go @@ -92,8 +92,7 @@ func CreateFromTimestampNano(timestamp int64, timezone ...string) Carbon { // CreateFromDateTime creates a Carbon instance from a given date and time. // 从给定的年、月、日、时、分、秒创建 Carbon 实例 func (c Carbon) CreateFromDateTime(year, month, day, hour, minute, second int, timezone ...string) Carbon { - now := c.Now(timezone...) - return c.create(year, month, day, hour, minute, second, now.Nanosecond(), timezone...) + return c.create(year, month, day, hour, minute, second, 0, timezone...) } // CreateFromDateTime creates a Carbon instance from a given date and time.