Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix for 704 #727

Merged
merged 2 commits into from
Oct 7, 2019
Merged

Conversation

bhagyashree-sarawate
Copy link
Contributor

@bhagyashree-sarawate bhagyashree-sarawate commented Aug 23, 2019

Fix for #704

@bhagyashree-sarawate
Copy link
Contributor Author

Hi
Modified diff.seconds to diff.total_seconds() and then rounded for getting the integer value
since,
seconds is the number of seconds within a day, which is in [0, 86399]. total_seconds is the entire timedelta converted to seconds
Please review
Regards
Bhagyashree Sarawate

Copy link
Collaborator

@sneharai4 sneharai4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhagyashree-sarawate Code changes looks good to me. Could you please attach the tests for this where I can see the expected results in docker volume inspect command.

diff_hour = diff.seconds / 3600
return diff_hour
diff_hour = diff.total_seconds() / 3600
return round(diff_hour)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this round?

@bhagyashree-sarawate
Copy link
Contributor Author

@bhagyashree-sarawate Code changes looks good to me. Could you please attach the tests for this where I can see the expected results in docker volume inspect command.

PFA output for the bug 704 which include import and inspect of a snapshot
output_704.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants