Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:slider插件onChange时间戳在中国有8小时时差,导致一天数据缺失 #46

Open
samsonCao opened this issue Jan 8, 2020 · 0 comments

Comments

@samsonCao
Copy link

dv.transform({
type: "filter",

callback(obj) {
  const time = new Date(obj.time).getTime(); // !注意:时间格式,建议转换为时间戳进行比较

  return time >= ds.state.start && time <= ds.state.end;
}

});

// 东八区 时间戳的8小时时区差异 28800000ms 此处需要补全

应该为 return time >= ds.state.start && time <= ds.state.end + 28800000;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant