Skip to content

Add X-TimeZone header support to REST API (#17344)#17387

Open
Lexert19 wants to merge 1 commit intoapache:masterfrom
Lexert19:f_timezone_header
Open

Add X-TimeZone header support to REST API (#17344)#17387
Lexert19 wants to merge 1 commit intoapache:masterfrom
Lexert19:f_timezone_header

Conversation

@Lexert19
Copy link
Copy Markdown

@Lexert19 Lexert19 commented Mar 29, 2026

Description

This PR adds support for the X-TimeZone header in REST API V2. The header is parsed in AuthorizationFilter and the time zone is set in the session. Integration tests are added to verify correct handling of valid and invalid time zones.

Closes #17344


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@HTHou
Copy link
Copy Markdown
Contributor

HTHou commented Mar 30, 2026

Another question, why did you pick X-TimeZone? I found there is a document uses Time-Zone.
https://docs.github.com/en/rest/using-the-rest-api/timezones-and-the-rest-api?apiVersion=2026-03-10#using-the-time-zone-header

@HTHou
Copy link
Copy Markdown
Contributor

HTHou commented Mar 30, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] RestAPI add set time zone

2 participants