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

Hover Details in Extended Graph off by 2 hours #31

Open
derekchan opened this issue Sep 15, 2014 · 0 comments
Open

Hover Details in Extended Graph off by 2 hours #31

derekchan opened this issue Sep 15, 2014 · 0 comments

Comments

@derekchan
Copy link

( My server is using UTC timezone, and my client is UTC +8 )

In the extended graph, the X-axis is using UTC +0. But the Hover details is using UTC +6 hours. I guess Graphitus converts the hover details to the client TZ. In the code, there is one line that seems to be the cause :

https://github.com/ezbz/graphitus/blob/master/js/extended-graph.js#L136

xFormatter: function(x) {
    return moment(((x - 7200) * 1000), "").format("YYYY-MM-DD HH:mm")
}

Changing this into the below worked for me - the hover details are now using UTC+8

xFormatter: function(x) {
    return moment((x * 1000), "").format("YYYY-MM-DD HH:mm")
}
@derekchan derekchan changed the title Hover details in extended graph appear to be off by 2 hours Hover Details in Extended Graph off by 2 hours Sep 15, 2014
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

No branches or pull requests

1 participant