superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC (#4511)
Date Fri, 02 Mar 2018 05:02:10 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 41defdc  Fix how the annotation layer interpretes the timestamp string without timezone
info; use it as UTC (#4511)
41defdc is described below

commit 41defdceaa0af44916973365889433e1517d0a3f
Author: EvelynTurner <36863942+EvelynTurner@users.noreply.github.com>
AuthorDate: Fri Mar 2 00:02:04 2018 -0500

    Fix how the annotation layer interpretes the timestamp string without timezone info; use
it as UTC (#4511)
---
 superset/assets/visualizations/nvd3_vis.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js
index ef54406..3739aa4 100644
--- a/superset/assets/visualizations/nvd3_vis.js
+++ b/superset/assets/visualizations/nvd3_vis.js
@@ -4,6 +4,7 @@ import throttle from 'lodash.throttle';
 import d3 from 'd3';
 import nv from 'nvd3';
 import mathjs from 'mathjs';
+import moment from 'moment';
 import d3tip from 'd3-tip';
 
 import { getColorFromScheme } from '../javascripts/modules/colors';
@@ -628,7 +629,7 @@ 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 timeColumn = new Date(moment.utc(r[e.timeColumn]));
               return {
                 ...r,
                 [e.timeColumn]: timeColumn,

-- 
To stop receiving notification emails like this one, please contact
graceguo@apache.org.

Mime
View raw message