From 42ebcaad40fff66b4cc833a04f988c5949280014 Mon Sep 17 00:00:00 2001 From: EvelynTurner <36863942+EvelynTurner@users.noreply.github.com> Date: Thu, 8 Mar 2018 13:19:36 -0500 Subject: [PATCH] Evelynturner/annotation timezone fix2 (#4550) * Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC * Fix how the Interval annotation layer interpretes the timestamp string without timezone info; use it as UTC --- superset/assets/visualizations/nvd3_vis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js index 3739aa41029c8..8bd7229710d11 100644 --- a/superset/assets/visualizations/nvd3_vis.js +++ b/superset/assets/visualizations/nvd3_vis.js @@ -670,8 +670,8 @@ function nvd3Vis(slice, payload) { const tip = tipFactory(e); const records = (slice.annotationData[e.name].records || []).map((r) => { - const timeColumn = new Date(r[e.timeColumn]); - const intervalEndColumn = new Date(r[e.intervalEndColumn]); + const timeColumn = new Date(moment.utc(r[e.timeColumn])); + const intervalEndColumn = new Date(moment.utc(r[e.intervalEndColumn])); return { ...r, [e.timeColumn]: timeColumn,