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 }