summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangyu <[email protected]>2022-10-14 13:36:21 +0800
committerzhangyu <[email protected]>2022-10-14 13:36:21 +0800
commitd45219ff79e2b9e48869de25075279ceaad0867c (patch)
treea49a2b2f545eff3cbf74bff83d3122091c373a8c
parent3c7ee3c1b0d8d948693b1f73ff626e2b835af059 (diff)
fix:修改 快照 chart-line 未做时区的处理rel-22.07.11
-rw-r--r--nezha-fronted/src/components/chart/chart/chartTimeSeries.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue
index 2f5e1226e..0f76fe5e0 100644
--- a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue
+++ b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue
@@ -249,9 +249,9 @@ export default {
offset = moment.tz(offset).format('Z')
offset = Number.parseInt(offset)
const localOffset = new Date().getTimezoneOffset() * 60 * 1000 * -1 // 默认 一分钟显示时区偏移的结果
- if (window.dataJson) {
- offset = new Date().getTimezoneOffset() * -1 / 60
- }
+ // if (window.dataJson) {
+ // offset = new Date().getTimezoneOffset() * -1 / 60
+ // }
const tData = new Date(value - localOffset + offset * 60 * 60 * 1000)
let hour = tData.getHours()
hour = hour > 9 ? hour : '0' + hour // 加0补充为两位数字