Skip to content

Commit

Permalink
fix keyviz tooltip timezone (pingcap#1395)
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine authored and shhdgit committed Nov 2, 2022
1 parent 7acd757 commit c48693c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/packages/tidb-dashboard-for-dbaas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pingcap/tidb-dashboard-for-dbaas",
"version": "0.0.29",
"version": "0.0.30",
"main": "dist/main.js",
"module": "dist/main.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,12 @@ export async function heatmapChart(

const timeText = [timeIdx, timeIdx + 1]
.map((idx) =>
d3.timeFormat('%Y-%m-%d\n%H:%M:%S')(
new Date(data.timeAxis[idx] * 1000)
)
// d3.timeFormat('%Y-%m-%d\n%H:%M:%S')(
// new Date(data.timeAxis[idx] * 1000)
// )
dayjs(data.timeAxis[idx as number] * 1000)
.utcOffset(tz.getTimeZone())
.format('YYYY-MM-DD HH:mm:ss')
)
.join(' ~ ')

Expand Down

0 comments on commit c48693c

Please sign in to comment.