// Minio returns modTime that includes microseconds if data comes from ListObjects
// while data coming from GetObject's modTimes are accurate down to seconds.
// To make this test pass while using Minio we build this client that truncates
// modTimes to Second.
Minio returns modTime that includes microseconds if data comes from ListObjects
while data coming from GetObject's modTimes are accurate down to seconds.
To make this test pass while using Minio we build this client that truncates
modTimes to Second.
// Minio returns modTime that includes microseconds if data comes from ListObjects // while data coming from GetObject ' s modTimes are accurate down to seconds . // To make this test pass while using Minio we build this client that truncates // modTimes to Second .
func (c *modTimeTruncateClient) ListObjects(in *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) {
	out, err := c.S3API.ListObjects(in)
	if err != nil {
		return out, err
	}
	for _, o := range out.Contents {
		o.LastModified = aws.Time(o.LastModified.Truncate(time.Second))
	}
	return out, err
}
func ( c * modTimeTruncateClient ) ListObjects ( in * s3 . ListObjectsInput ) ( * s3 . ListObjectsOutput , error ) { out , err := c . S3API . ListObjects ( in ) if err != nil { return out , err } for _ , o := range out . Contents { o . LastModified = aws . Time ( o . LastModified . Truncate ( time . Second ) ) } return out , err }
Minio returns modTime that includes microseconds if data comes from ListObjects
while data coming from GetObject's modTimes are accurate down to seconds.
Minio returns modTime that includes microseconds if data comes from ListObjects while data coming from GetObject ' s modTimes are accurate down to seconds .