From 58bcbf522014359c535938b0137e8ded79a1c0ca Mon Sep 17 00:00:00 2001 From: lijianbin <513837235@.qq.com> Date: Fri, 24 Dec 2021 11:58:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=93=E5=A4=A9=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=B6=E9=97=B4=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- time.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/time.go b/time.go index d1dcce5..d586193 100755 --- a/time.go +++ b/time.go @@ -31,6 +31,17 @@ func GetTodayStartTimeStamp() int64 { return reserveTime.Unix() } +// 获取当天结束时间戳 +func GetTodayEndTimeStamp() int64 { + + var reserveTime time.Time + loc, _ := time.LoadLocation("Asia/Shanghai") + + date := time.Now().Format("2006-01-02") + reserveTime, _ = time.ParseInLocation("2006-01-02 15:04:05", date+" 23:59:59", loc) + return reserveTime.Unix() +} + // 获取本周开始时间戳 func GetWeekStartTimeStamp() int64 {