|
@@ -52,7 +52,7 @@ func HandleYongyiExcelDaily1(f *excelize.File, sheetName string) (indexList []*m
|
|
|
if text != "" {
|
|
|
// 日期
|
|
|
var dateT time.Time
|
|
|
- dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
|
|
|
+ dateT, e = utils.ParseExcelDateToTime(text)
|
|
|
if e != nil {
|
|
|
//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
|
|
|
continue
|
|
@@ -198,7 +198,7 @@ func HandleYongyiExcelDaily2(f *excelize.File, sheetName string) (indexList []*m
|
|
|
// 日期
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
|
- dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
|
|
|
+ dateT, e = utils.ParseExcelDateToTime(text)
|
|
|
if e != nil {
|
|
|
utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
|
|
|
continue
|
|
@@ -358,7 +358,7 @@ func HandleYongyiExcelDaily3(f *excelize.File, sheetName string) (indexList []*m
|
|
|
break
|
|
|
}
|
|
|
var dateT time.Time
|
|
|
- dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
|
|
|
+ dateT, e = utils.ParseExcelDateToTime(text)
|
|
|
if e != nil {
|
|
|
utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
|
|
|
continue
|
|
@@ -478,13 +478,13 @@ func HandleYongyiExcelDaily4(f *excelize.File, sheetName string) (indexList []*m
|
|
|
continue
|
|
|
}
|
|
|
} else {
|
|
|
- dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
|
|
|
+ dateT, e = utils.ParseExcelDateToTime(text)
|
|
|
if e != nil {
|
|
|
- dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
|
|
|
- if e != nil {
|
|
|
- utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
|
|
|
- continue
|
|
|
- }
|
|
|
+ /*dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
|
|
|
+ if e != nil {*/
|
|
|
+ utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
|
|
|
+ continue
|
|
|
+ //}
|
|
|
}
|
|
|
}
|
|
|
dateMap[k] = dateT.Format(utils.FormatDate)
|