Skip to content

Hover Details in Extended Graph off by 2 hours #31

Description

@derekchan

( 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")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions