mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
fix: time.Parse RFC3339Nano (#16892)
This commit is contained in:
parent
66ff17e452
commit
16feef2a2c
@ -232,7 +232,7 @@ func putOpts(ctx context.Context, r *http.Request, bucket, object string, metada
|
|||||||
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
||||||
mtime := UTCNow()
|
mtime := UTCNow()
|
||||||
if mtimeStr != "" {
|
if mtimeStr != "" {
|
||||||
mtime, err = time.Parse(time.RFC3339, mtimeStr)
|
mtime, err = time.Parse(time.RFC3339Nano, mtimeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return opts, InvalidArgument{
|
return opts, InvalidArgument{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
@ -353,7 +353,7 @@ func completeMultipartOpts(ctx context.Context, r *http.Request, bucket, object
|
|||||||
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
||||||
mtime := UTCNow()
|
mtime := UTCNow()
|
||||||
if mtimeStr != "" {
|
if mtimeStr != "" {
|
||||||
mtime, err = time.Parse(time.RFC3339, mtimeStr)
|
mtime, err = time.Parse(time.RFC3339Nano, mtimeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return opts, InvalidArgument{
|
return opts, InvalidArgument{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
|
Loading…
Reference in New Issue
Block a user