Skip to content

Commit

Permalink
Fix how the annotation layer interpretes the timestamp string without…
Browse files Browse the repository at this point in the history
… timezone info; use it as UTC (apache#4511)
  • Loading branch information
EvelynTurner authored and Grace Guo committed Mar 2, 2018
1 parent 51756c4 commit 1e96f0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/visualizations/nvd3_vis.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1e96f0a

Please sign in to comment.