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
This commit is contained in:
EvelynTurner 2018-03-08 13:19:36 -05:00 committed by Maxime Beauchemin
parent 9ad50c9d55
commit 42ebcaad40

View File

@ -670,8 +670,8 @@ function nvd3Vis(slice, payload) {
const tip = tipFactory(e); const tip = tipFactory(e);
const records = (slice.annotationData[e.name].records || []).map((r) => { 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]));
const intervalEndColumn = new Date(r[e.intervalEndColumn]); const intervalEndColumn = new Date(moment.utc(r[e.intervalEndColumn]));
return { return {
...r, ...r,
[e.timeColumn]: timeColumn, [e.timeColumn]: timeColumn,