aws s3 sync --exact-timestamps {from-s3} {to-local}
does not check the time correctly.
#8092
Labels
aws s3 sync --exact-timestamps {from-s3} {to-local}
does not check the time correctly.
#8092
Describe the bug
When running
aws s3 sync --exact-timestamps {from-s3} {to-local}
, always copying files even if no changes.Expected Behavior
Once copied a file by
sync
command, copy does not happen in next time.Current Behavior
Always copy is happened.
It is caused by the difference in date precision.
I've confirmed that the following command and result.
Here is the point.
When syncing file by
aws s3 sync
, part of milli seconds is missing, and the date difference happen every time by the below.https://github.com/aws/aws-cli/blob/develop/awscli/customizations/s3/syncstrategy/exacttimestamps.py#L40
Reproduction Steps
Possible Solution
I'm not familiar with Python,but we think 2 options.
a) allow less than 1 sec.
https://github.com/aws/aws-cli/blob/develop/awscli/customizations/s3/syncstrategy/exacttimestamps.py#L40
b) update timestamp with keeeping precise.
https://github.com/aws/aws-cli/blob/develop/awscli/customizations/s3/utils.py#L382
Additional Information/Context
No response
CLI version used
aws-cli/2.13.3 Python/3.11.4 Darwin/22.5.0 exe/x86_64 prompt/off
Environment details (OS name and version, etc.)
Mac OS 13.4.1
The text was updated successfully, but these errors were encountered: