Skip to content

Support multiple time zone #1583

Closed
Closed

Description

@HangyuanLiu

Is your feature request related to a problem? Please describe.
Support multiple time zone

Solution:

  1. Setting of time zone related parameters:
    mainly involves two parameters "system_time_zone" and "time_zone".
    "system_time_zone" is obtained by calling the system interface and cannot be modified.
    "time_zone" parameter can be modified. To be compatible with historical logic, the default setting is CST.
    Time zone values ​​can be given in several formats, no case sensitive:
  • "SYSTEM", indicating that the server time zone is the same as the system time zone
  • A string representing the UTC offset, such as '+10:00' or '-06:00'
  • Standard time zone format such as "Asia/Shanghai", "America/Los_Angeles"
  • Abbreviated time zone formats such as "MET", "CTT" are not supported. Because the abbreviated time zone is ambiguous in different scenarios, it is not recommended.
  • In order to be compatible with Doris, support CST abbreviated time zone, internally transfer CST to "China/Shanghai" Chinese standard time zone
  1. Time zone in BE: Perceive the time zone by Fe, and then pass two parameters to be. One is the UTC timestamp, and the other is the time zone information.

  2. the time recorded in the fe: such as "show backends", "show load". These time fields should be modified according to the time zone. Fe internally stores timestamps. The timestamp can be converted to a date literal by calling the TimeUtils.longToTimeString function. Inside the function, get the time zone configuration through Session variabled

Activity

  1. imay commented on Aug 5, 2019

    @imay
    Contributor

    @HangyuanLiu

    I have a question. How can we get system_time_zone? How to keep the values on each node consistent.

    And I think this can be split into some small patches.

    For example:

    1. support related user function aware of time zone.
    2. Support time zone for our system usage.
  2. HangyuanLiu commented on Aug 5, 2019

    @HangyuanLiu
    ContributorAuthor

    @imay
    I think system_time_zone is a parameter that represents the time zone of the machine, but the other variable "time_zone" is really takes effect.
    So system_time_zone is fetched according to the machine's time zone and cannot be modified. The time_zone function is customizable in doris cluster.

    And I will split this feature as three commit

  3. added
    kind/featureCategorizes issue or PR as related to a new feature.
    on Jan 7, 2020
  4. added this to the 0.11 milestone on Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions