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

utils.generate_time_labels(), wrong conversion to seconds? #2068

Closed
ghost opened this issue Jul 27, 2016 · 3 comments
Closed

utils.generate_time_labels(), wrong conversion to seconds? #2068

ghost opened this issue Jul 27, 2016 · 3 comments

Comments

@ghost
Copy link

@ghost ghost commented Jul 27, 2016

@charlesdoutriaux
In vcs.utils.get_time_labels(), when checking the 'units' argument:

    u = units.split('since')[0].strip().lower()
    # ...
    elif u in ['minute', 'minutes']:
         delta = (d2 - d1) / 24. / 60.
    elif u in ['second', 'seconds']:
         delta = (d2 - d1) / 24. / 60.

Shouldn't the calculation for seconds be

        delta = (d2 - d1) / 24. / 60. / 60. 

?

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Jul 27, 2016

yep looks like some copy/pasting that went bad. Go ahead and fix it please.

@ghost
Copy link
Author

@ghost ghost commented Jul 27, 2016

@charlesdoutriaux You got it.

@ghost
Copy link
Author

@ghost ghost commented Sep 14, 2016

This PR was incorporated in #2117. Calculation is fixed.

@ghost ghost closed this Sep 14, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant