From 45cb7c1c6604980faa82f9a94554e5e374c27f43 Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Wed, 5 Oct 2022 00:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=20time.Time=20?= =?UTF-8?q?=E8=BD=AC=20json=20=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/time/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/time/time.go b/common/time/time.go index 371769e..b9f8680 100644 --- a/common/time/time.go +++ b/common/time/time.go @@ -11,7 +11,7 @@ const ( timeFormat = "2006-01-02 15:04:05" ) -// MarshalJSON on JsonTime format Time field with %Y-%m-%d %H:%M:%S +// MarshalJSON on Json Time format Time field with %Y-%m-%d %H:%M:%S func (t Time) MarshalJSON() ([]byte, error) { // 重写time转换成json之后的格式 var tmp = fmt.Sprintf("\"%s\"", time.Time(t).Format(timeFormat))