Skip to content

Commit

Permalink
Properly convert a 0-based month value
Browse files Browse the repository at this point in the history
- UTCmonth returns 0-11, we live in a world where months are 1-12...
  • Loading branch information
atheurer committed Oct 18, 2023
1 parent 6fcf8d9 commit bbbec9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions queries/cdmq/get-metric-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Object.keys(metric_data.values)
vals[0][col] =
sprintf('%02d', date.getUTCDate()) +
'-' +
sprintf('%02d', date.getUTCMonth()) +
sprintf('%02d', date.getUTCMonth() + 1) +
'-' +
sprintf('%04d', date.getUTCFullYear());
vals[1][col] =
Expand All @@ -191,7 +191,7 @@ Object.keys(metric_data.values)
vals[0][col] =
sprintf('%02d', date.getUTCDate()) +
'-' +
sprintf('%02d', date.getUTCMonth()) +
sprintf('%02d', date.getUTCMonth() + 1) +
'-' +
sprintf('%04d', date.getUTCFullYear()) +
'/' +
Expand Down

0 comments on commit bbbec9b

Please sign in to comment.