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

Deal with v2 json output from vnstat defining hours differently #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

benjsc
Copy link

@benjsc benjsc commented Jun 19, 2019

Using vnstat 2.0 I found that the hours were all broken. This turns out it's because the json output changed.
The fix below fixes the hours being completely wrong in v2 json output.
I've not tested with v1 api, though it should work.

extremeCrazyCoder and others added 3 commits February 12, 2019 20:54
changed variable names from kb to bytes getLargestPrefix,bytesToString@vnstat.php
changed function name from kbytesToString to bytesToString
This break makes sure at most 1 day is displayed in the hours graph.
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