mirror of https://github.com/Xhofe/alist
fix(189cloudpc): wrong modified time (close #910)
parent
24d031d578
commit
5295593bf8
|
@ -229,7 +229,7 @@ func (driver Cloud189) Files(path string, account *model.Account) ([]model.File,
|
|||
Size: 0,
|
||||
Type: conf.FOLDER,
|
||||
Driver: driver.Config().Name,
|
||||
UpdatedAt: MustParseTime(folder.CreateDate),
|
||||
UpdatedAt: MustParseTime(folder.LastOpTime),
|
||||
})
|
||||
}
|
||||
for _, file := range resp.FileListAO.FileList {
|
||||
|
@ -239,7 +239,7 @@ func (driver Cloud189) Files(path string, account *model.Account) ([]model.File,
|
|||
Size: file.Size,
|
||||
Type: utils.GetFileType(filepath.Ext(file.Name)),
|
||||
Driver: driver.Config().Name,
|
||||
UpdatedAt: MustParseTime(file.CreateDate),
|
||||
UpdatedAt: MustParseTime(file.LastOpTime),
|
||||
Thumbnail: file.Icon.SmallUrl,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -144,8 +144,9 @@ func BoolToNumber(b bool) int {
|
|||
}
|
||||
|
||||
func MustParseTime(str string) *time.Time {
|
||||
time, _ := http.ParseTime(str)
|
||||
return &time
|
||||
loc, _ := time.LoadLocation("Local")
|
||||
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05", str, loc)
|
||||
return &lastOpTime
|
||||
}
|
||||
|
||||
type Params map[string]string
|
||||
|
|
Loading…
Reference in New Issue