Skip to content

Support multiple time zone #1583

@HangyuanLiu

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

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