Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix timezone for hours

Uku Taht3cf30fdc3c8b
diff --git a/assets/js/stats/main-graph.js b/assets/js/stats/main-graph.js
index d575190666..fbb0dfb194 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'