fix tasklist time bugs

Former-commit-id: f86a6d74fa
This commit is contained in:
tzwang 2024-05-21 10:50:13 +08:00
parent 477df1fb00
commit d4db154bc7
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"
)