fix(189pc): some minor problems

pull/1831/head
foxxorcat 2022-09-11 13:18:29 +08:00
parent 537ca030b2
commit 9c91f062b9
2 changed files with 2 additions and 9 deletions

View File

@ -78,8 +78,7 @@ func timestamp() int64 {
}
func MustParseTime(str string) *time.Time {
loc, _ := time.LoadLocation("Asia/Shanghai")
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05", str, loc)
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", time.Local)
return &lastOpTime
}

View File

@ -140,13 +140,7 @@ func (y *Yun189PC) getFiles(ctx context.Context, fileId string) ([]model.Obj, er
fullUrl += "/listFiles.action"
res := make([]model.Obj, 0, 130)
for pageNum := 1; pageNum < 100; pageNum++ {
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
}
for pageNum := 1; ; pageNum++ {
var resp Cloud189FilesResp
_, err := y.get(fullUrl, func(r *resty.Request) {
r.SetContext(ctx)