From 8e40465e86d4670e2799d197284641bec34bd3d1 Mon Sep 17 00:00:00 2001 From: Sean <866155+SeanHeuc@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:12:05 +0800 Subject: [PATCH] fix(aliyundrive_open): date format on uploading (#5151) (cherry picked from commit 88f815979ac91caa8bc425a2ff9a18bbd8a2e736) --- drivers/aliyundrive_open/upload.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/aliyundrive_open/upload.go b/drivers/aliyundrive_open/upload.go index 29e7e310374..e4a0cf7ec0d 100644 --- a/drivers/aliyundrive_open/upload.go +++ b/drivers/aliyundrive_open/upload.go @@ -148,9 +148,8 @@ func (d *AliyundriveOpen) upload(ctx context.Context, dstDir model.Obj, stream m // Part Size Unit: Bytes, Default: 20MB, // Maximum number of slices 10,000, ≈195.3125GB var partSize = calPartSize(stream.GetSize()) - const dateFormat = "2006-01-02T15:04:05.999Z" - mtime := stream.ModTime() - mtimeStr := mtime.UTC().Format(dateFormat) + const dateFormat = "2006-01-02T15:04:05.000Z" + mtimeStr := stream.ModTime().UTC().Format(dateFormat) ctimeStr := stream.CreateTime().UTC().Format(dateFormat) createData := base.Json{