mistercrunch closed pull request #4550: Evelynturner/annotation timezone fix2
URL: https://github.com/apache/incubator-superset/pull/4550
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/visualizations/nvd3_vis.js 
b/superset/assets/visualizations/nvd3_vis.js
index 3739aa4102..8bd7229710 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,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to