mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 20:13:31 +03:00
Fix timezone for hours
This commit is contained in:
parent
b458b5a392
commit
3cf30fdc3c
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user