Skip to content

Commit

Permalink
Fix line graphs in metrics dashboards (#478)
Browse files Browse the repository at this point in the history
The period data returned by our metrics service includes Z as a
timezone, which indicates UTC. Adding the extra UTC made the data
unparseable, leading to NaN:NaN being represented as our periods.

Co-authored-by: PoeppingT <[email protected]>
Co-authored-by: brtrvn <[email protected]>
  • Loading branch information
3 people authored Feb 10, 2023
1 parent f843997 commit 7f4b9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/web/src/metrics/ducks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const metricQueryAdapter = createEntityAdapter({

const conditionDates = (response) => {
const formatDate = (date) => {
const d = new Date(`${date} UTC`)
const d = new Date(`${date}`)
return `${d.getMonth() + 1}-${d.getDate()} ${d.getHours().toString().padStart(2, '0')}:${d
.getMinutes()
.toString()
Expand Down

0 comments on commit 7f4b9a1

Please sign in to comment.