Skip to content

[Bug] echarts.time.format get wrong time. #16280

@zhyd1997

Description

@zhyd1997

Version

5.2.2

Link to Minimal Reproduction

https://codesandbox.io/s/echarts-time-bug-mxphv

Steps to Reproduce

Just look at the result logged in the console.

Current Behavior

console.log(echarts.time.format("2021-12-25T00:00:00Z", "yyyy-MM-dd", true) );
// yyyy-MM-dd

Expected Behavior

console.log(echarts.time.format("2021-12-25T00:00:00Z", "yyyy-MM-dd", true) );
// 2021-12-25

Environment

- OS: macOS Big Sur
- Browser: Chrome Version 96.0.4664.110 (Official Build) (x86_64)
- Framework: React@17.0.2

Any additional comments?

when I use echarts heatmap calendar examples: Simple Calendar

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnot-a-bug

    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