Skip to content

Druid parse error on formatted time field with non-zero timezone #6343

@zhaojiandong

Description

@zhaojiandong

part of jvm.config:

-Duser.timezone=Asia/Shanghai

timestampSpec config :

"timestampSpec": {
    "format": "yyyy-MM-dd HH:mm:ss",
    "column": "logTime"
}

events example:

{"logTime":"2018-09-10 18:00:00","dim1":"d1","dim2":"d2","value":100}
{"logTime":"2018-09-10 18:00:00","dim1":"d1","dim2":"d2","value":90}

We set user.timezone=Asia/Shanghai, so the correct timestamp is 1536573600000. But druid specifies the UTC timezone, and the TimestampParser recognizes '2018-09-10 18:00:00' as '2018-09-10 18:00:00+00:00' , so it's parsed to 1536602400000.
I will fixed it.

Metadata

Metadata

Assignees

No one assigned

    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