From 09a9f14a2959483c90d45282317b1baac96b2833 Mon Sep 17 00:00:00 2001 From: ayflying Date: Wed, 9 Apr 2025 11:47:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ExcelTime2Time=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/time.go b/tools/time.go index 388fd57..2226e13 100644 --- a/tools/time.go +++ b/tools/time.go @@ -124,7 +124,7 @@ func (m *timeMod) GetDailyTimeList(time1 time.Time, time2 time.Time) (timeList [ // ExcelTime2Time excel时间转时间 (12/10/24 02:03转为时间) func (m *timeMod) ExcelTime2Time(excelTime string) time.Time { - layout := "01/02/06 15:04" // 月/日/年(最后两位) 小时:分钟 (24小时制) + layout := "1/2/06 15:04" // 月/日/年(最后两位) 小时:分钟 (24小时制) timeNew, _ := time.ParseInLocation(layout, excelTime, time.Local) return timeNew }