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

Comments

Projects
None yet
1 participant
@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

This comment has been minimized.

Member

doutriaux1 commented Jul 27, 2016

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

@ghost

This comment has been minimized.

ghost commented Jul 27, 2016

@charlesdoutriaux You got it.

@ghost

This comment has been minimized.

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