Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC (#4511)

This commit is contained in:
EvelynTurner 2018-03-02 00:02:04 -05:00 committed by Grace Guo
parent 2637d3d5e2
commit 41defdceaa
1 changed files with 2 additions and 1 deletions

View File

@ -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,