forked from JointCloud/pcm-coordinator
parent
477df1fb00
commit
d4db154bc7
|
@ -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]
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue