featzhang created FLINK-39042:
---------------------------------

             Summary: [webui] Make watermark timestamps timezone-aware and 
configurable
                 Key: FLINK-39042
                 URL: https://issues.apache.org/jira/browse/FLINK-39042
             Project: Flink
          Issue Type: Improvement
          Components: Runtime / Web Frontend
            Reporter: featzhang


h4. Summary

The Flink Web UI Watermarks page already supports displaying *formatted 
datetime strings* for watermark timestamps.
However, the {*}timezone is neither explicitly indicated nor configurable{*}, 
which can easily lead to ambiguity and operational confusion in multi-region 
environments.

This issue proposes to *explicitly label the timezone* used for formatted 
timestamps and *add a timezone switching capability* to the UI.
----
h4. Current Behavior
 * The Watermarks page displays:

 ** Raw timestamp (milliseconds since epoch)

 ** A formatted datetime string (e.g. {{{}2026-02-05 09:58:50{}}})

 * {*}Problems with the current behavior{*}:

 ## The formatted time {*}does not clearly indicate which timezone it belongs 
to{*}.

 ## Users cannot switch the timezone (e.g. UTC vs local time).

 ## Operators must _infer_ the timezone based on browser or deployment context, 
which is error-prone.

Example (current UI):

 

{{1770256730000 → 2026-02-05 09:58:50}}

>From this display alone, it is unclear whether the time is UTC, browser local 
>time, or another timezone.
----
h4. Proposed Improvements
h5. 1. Explicit Timezone Labeling
 * Always display the timezone together with the formatted timestamp.

 * Suggested format:

 

{{Timestamp (YYYY-MM-DD HH:mm:ss Z)}}

Example:

 

{{1770256730000 (2026-02-05 09:58:50 UTC+8)}}

This removes ambiguity and makes the time semantics explicit.
----
h5. 2. Timezone Switching Support
 * Add a timezone selector (e.g. dropdown or toggle group) above the Watermarks 
table.

 * Supported options could include:

 ** UTC

 ** Browser Local Time

 ** Fixed offsets (e.g. UTC+8)

Example UI concept:

 

{{[ Timezone: UTC | Local | UTC+8 ]}}

Changing the selection updates all formatted timestamps on the page accordingly.
----
h5. 3. Consistency & Reusability
 * The same timezone formatting and switching logic should be reusable for:

 ** Checkpoints

 ** Backpressure

 ** Other Web UI pages displaying time-based metrics

----
h4. Motivation & Use Cases
 * *Debugging*
Quickly determine whether a subtask watermark is lagging behind wall-clock time 
without guessing the timezone.

 * *Monitoring & Operations*
Teams operating clusters across regions can view timestamps in a consistent, 
explicit timezone.

 * *User Experience*
Avoid confusion caused by implicit timezone assumptions.

----
h4. Non-Goals
 * This issue does *not* change watermark semantics or calculation logic.

 * This issue focuses purely on {*}UI presentation and usability 
improvements{*}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to