Merge pull request 'fix tasklist bugs' (#194) from tzwang/pcm-coordinator:master into master

Former-commit-id: 31a30cf0f13ca75d3857096d8e58794b01e353e1
This commit is contained in:
tzwang 2024-05-21 10:53:41 +08:00
commit f2bb7d673a
2 changed files with 6 additions and 3 deletions

View File

@ -101,8 +101,8 @@ func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch cha
task := list[0]
for i := range list {
earliest, _ := time.Parse(constants.Layout, task.UpdatedTime)
latest, _ := time.Parse(constants.Layout, list[i].UpdatedTime)
earliest, _ := time.Parse(constants.Layout_temp, task.UpdatedTime)
latest, _ := time.Parse(constants.Layout_temp, list[i].UpdatedTime)
if latest.Before(earliest) {
task = list[i]
}

View File

@ -1,3 +1,6 @@
package constants
const Layout = "2006-01-02 15:04:05"
const (
Layout = "2006-01-02 15:04:05"
Layout_temp = "2006-01-02T15:04:05Z07:00"
)