From 3cf30fdc3c8bdb17558c56ce6039ca7371519e61 Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Tue, 15 Oct 2019 11:33:37 +0800 Subject: [PATCH] Fix timezone for hours --- assets/js/stats/main-graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/stats/main-graph.js b/assets/js/stats/main-graph.js index d57519066..fbb0dfb19 100644 --- a/assets/js/stats/main-graph.js +++ b/assets/js/stats/main-graph.js @@ -220,7 +220,7 @@ function dateFormatter(graphData) { } else if (graphData.interval === 'date') { return date.getUTCDate() + ' ' + MONTHS[date.getUTCMonth()]; } else if (graphData.interval === 'hour') { - var hours = date.getUTCHours(); + var hours = date.getHours(); // Not sure why getUTCHours doesn't work here var ampm = hours >= 12 ? 'pm' : 'am'; hours = hours % 12; hours = hours ? hours : 12; // the hour '0' should be '12'