-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
3.1.5 (also affects 3.1.1+)
What happened?
The DAG Run details panel displays inconsistent timezone formatting between the Run ID and other datetime fields.
Run ID displays raw ISO 8601 format with explicit timezone offset:
scheduled__2026-01-08T07:00:00+00:00
Datetime fields display formatted time without timezone indicator:
Logical Date: 2026-01-07 23:00:00
Start Date: 2026-01-07 23:00:01
End Date: 2026-01-07 23:05:30
Data Interval Start: 2026-01-07 23:00:00
Data Interval End: 2026-01-07 23:00:00
This creates visual confusion - the Run ID shows 2026-01-08T07:00:00+00:00 (UTC) while the Details panel shows 2026-01-07 23:00:00 (user's selected timezone, America/Los_Angeles in this case) with no timezone indicator.
Root cause: PR #56392 changed the header/details to display the raw dag_run_id string instead of a formatted datetime:
// Before PR #56392 (3.1.0 and earlier)
label: dagRun === undefined ? runId : <Time datetime={dagRun.run_after} />,
// After PR #56392 (3.1.1+)
label: dagRun === undefined ? runId : dagRun.dag_run_id,The <Time> component formats datetimes using DEFAULT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss" (no timezone indicator) and converts to the user's selected timezone. But the raw dag_run_id string is displayed as-is, including the +00:00 suffix from Python's datetime.isoformat().
In Airflow 2.x, standard run_ids were parsed and the datetime portion was displayed using the Time component, so users saw consistent formatting throughout the UI.
What you think should happen instead?
Add timezone indicator to DEFAULT_DATETIME_FORMAT so all datetime fields show their timezone:
// Current
DEFAULT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss" // → 2026-01-07 23:00:00
// Expected
DEFAULT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss z" // → 2026-01-07 23:00:00 PSTThis way users can immediately see which timezone each timestamp represents, eliminating the cognitive overhead of mentally converting between UTC (in run_id) and their local timezone (in datetime fields).
How to reproduce
- Set your browser/Airflow timezone to something other than UTC (e.g., America/Los_Angeles)
- View any DAG Run details page for a scheduled run
- Compare the Run ID field with the datetime fields in the Details panel
- Observe that Run ID shows
+00:00(UTC) while other fields show times converted to your timezone without any indicator
Operating System
macOS (also reproducible on Linux)
Versions of Apache Airflow Providers
N/A - core UI issue
Deployment
Kubernetes (Helm)
Deployment details
Standard Airflow 3.1.5 deployment with Celery executor
Anything else?
Related:
- PR Make Dag Run ID visible in Dag Header Card #56392 introduced raw run_id display in 3.1.1
- PR Unify datetime format in the UI #55572 unified datetime format across UI (but excluded run_id)
- Issue dag_run timestamp incorrect due to setting time zone #54006 discusses other run_id timezone issues
UI Source References:
airflow-core/src/airflow/ui/src/utils/datetimeUtils.ts- definesDEFAULT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss"airflow-core/src/airflow/ui/src/components/Time.tsx- Time component that formats datetime fieldsairflow-core/src/airflow/ui/src/pages/Run/Details.tsx- displays{dagRun.dag_run_id}as raw text
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct