Skip to content

Commit

Permalink
fix(189pc): some minor problems
Browse files Browse the repository at this point in the history
  • Loading branch information
foxxorcat committed Sep 11, 2022
1 parent 537ca03 commit 9c91f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions drivers/189pc/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 1 addition & 7 deletions drivers/189pc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c91f06

Please sign in to comment.