fix tasklist time bugs
Former-commit-id: f86a6d74faf21d9ecd248512dfe5316e50ac6fcf
This commit is contained in:
parent
477df1fb00
commit
d4db154bc7
|
@ -101,8 +101,8 @@ func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch cha
|
||||||
|
|
||||||
task := list[0]
|
task := list[0]
|
||||||
for i := range list {
|
for i := range list {
|
||||||
earliest, _ := time.Parse(constants.Layout, task.UpdatedTime)
|
earliest, _ := time.Parse(constants.Layout_temp, task.UpdatedTime)
|
||||||
latest, _ := time.Parse(constants.Layout, list[i].UpdatedTime)
|
latest, _ := time.Parse(constants.Layout_temp, list[i].UpdatedTime)
|
||||||
if latest.Before(earliest) {
|
if latest.Before(earliest) {
|
||||||
task = list[i]
|
task = list[i]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
package constants
|
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