Skip to content

Commit

Permalink
TimeZone Bug-Fix, Daily Hourly Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVardevanyan committed Sep 16, 2021
1 parent fbad16e commit f422034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webFrontend/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function hourlyLineChart(data) {
const dailyPlays = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];

for (const i in data) {
localTime = new Date(`${data[i].timePlayed} UTC`);
localTime = new Date(`${data[i].timePlayed}`);
day = (`${localTime.getFullYear()}-${(`0${localTime.getMonth() + 1}`).slice(-2)}-${(`0${localTime.getDate()}`).slice(-2)}`);
hour = (`0${String(localTime.getHours())}`).slice(-2);

Expand Down

0 comments on commit f422034

Please sign in to comment.