修改ExcelTime2Time方法

This commit is contained in:
ayflying
2025-04-09 11:47:07 +08:00
parent e0afb55bb2
commit 09a9f14a29

View File

@@ -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
}