Skip to content

[Airflow 3.1.x] Run ID displays raw timezone offset (+00:00) while datetime fields use formatted display without timezone indicator #60302

@erinforman

Description

@erinforman

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 PST

This 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

  1. Set your browser/Airflow timezone to something other than UTC (e.g., America/Los_Angeles)
  2. View any DAG Run details page for a scheduled run
  3. Compare the Run ID field with the datetime fields in the Details panel
  4. 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:

UI Source References:

  • airflow-core/src/airflow/ui/src/utils/datetimeUtils.ts - defines DEFAULT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss"
  • airflow-core/src/airflow/ui/src/components/Time.tsx - Time component that formats datetime fields
  • airflow-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

Metadata

Metadata

Assignees

Labels

area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions