Skip to content

Commit

Permalink
Evelynturner/annotation timezone fix2 (#4550)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
EvelynTurner authored and mistercrunch committed Mar 8, 2018
1 parent 9ad50c9 commit 42ebcaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/visualizations/nvd3_vis.js
Expand Up @@ -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,
Expand Down

0 comments on commit 42ebcaa

Please sign in to comment.