diff --git a/crontask/genpmxml.go b/crontask/genpmxml.go index 1a4a77f5..4090307f 100644 --- a/crontask/genpmxml.go +++ b/crontask/genpmxml.go @@ -145,6 +145,7 @@ func (t *TaskFunc) GenNFPMXmlFile(neType string) error { //measurement.PmData.Object.CV = sortValues[pmName].Value } pmFile.Measurements = append(pmFile.Measurements, measurement) + startTime = startTime[:len("2006-01-02 15:04:05")] pmFile.FileHeader = pmschema.FileHeader{ TimeStamp: timestamp, @@ -162,8 +163,6 @@ func (t *TaskFunc) GenNFPMXmlFile(neType string) error { //folderName := global.GetFmtTimeString(global.DateTime, startTime, global.DateHour) //folderPath := global.CreateDir(folderName, yamlConfig.NBI.PM.XmlFileDir) - startTime = startTime[:len("2006-01-02 15:04:05")] - log.Debug("startTime:", startTime) timefile := global.GetFmtTimeString(time.DateTime, startTime, global.DateData) xmlfile := fmt.Sprintf("%s/%s-PM-%s-%s-%s-%s-%s-15-001.xml",