From 8987958e2654f0b328eda19f88c66a37304405fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= Date: Mon, 15 Nov 2021 20:31:44 +0800 Subject: [PATCH] :bug: fix 189 size and time --- drivers/189.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/189.go b/drivers/189.go index d7127007..bb3883f8 100644 --- a/drivers/189.go +++ b/drivers/189.go @@ -85,8 +85,14 @@ func (c Cloud189) FormatFile(file *Cloud189File) *model.File { Thumbnail: file.Icon.SmallUrl, Url: file.Url, } + loc, _ := time.LoadLocation("Local") + lastOpTime, err := time.ParseInLocation("2006-01-02 15:04:05", file.LastOpTime, loc) + if err == nil { + f.UpdatedAt = &lastOpTime + } if file.Size == -1 { f.Type = conf.FOLDER + f.Size = 0 } else { f.Type = utils.GetFileType(filepath.Ext(file.Name)) }