Skip to content

Timewarp and Timezones #5156

@clintropolis

Description

@clintropolis

Queries using both timewarp post processing and a PeriodGranularity specifying a timezone do not correctly offset dates if a daylight savings time transition occurs between the source data interval and the query interval. For example, a query of the form

{
      "queryType": "timeseries",
      "dataSource": "some_datasource",
      "intervals": "2017-12-04T08Z/2017-12-011T08Z",
      "granularity": {
        "type": "period",
        "period": "P1D",
        "timeZone": "America/Los_Angeles"
      },
      "context": {
        "postProcessing": {
          "type": "timewarp",
          "dataInterval": "2015-06-22/2015-07-20",
          "period": "P1D",
          "origin": "2015-07-20"
        },
        ...

returns results that are shifted by an hour

[ {
  "timestamp" : "2017-12-03T23:00:00.000-08:00",
  "result" : ...
}, {
  "timestamp" : "2017-12-04T23:00:00.000-08:00",
  "result" : ...
}
...

Currently, TimewarpOperator is unaware of the timezone and thus any daylight savings time shifts that might occur and should be taken into account when calculating the offset.

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