Skip to content

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

@samsonCao

Description

@samsonCao

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions