apache / apache/airflow

ExternalTaskSensor poke log shows logical_date in UTC despite configured timezone

Open Beginner friendly
#69,657 1 comment 0 reactions 0 assignees View on GitHub
area:core-operators kind:bug needs-triage
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

### Under which category would you file this issue?

Airflow Core

### Apache Airflow version

3.1.8

### What happened and how to reproduce it?

When `ExternalTaskSensor` logs its poke message, the datetime shown after `on` is serialized directly with `datetime.isoformat()`.

```shell
Poking for DAG 'example_external_dag' on 2026-07-06T21:00:00+00:00 ...
```

In deployments configured with a non-UTC timezone, such as AIRFLOW__CORE__DEFAULT_TIMEZONE=Asia/Seoul, this can be confusing because task log timestamps may be shown in the configured/local timezone while the ExternalTaskSensor poke message still displays the external logical date in UTC.

**Current code path**
```python
def _serialize_dttm_filter(dttm_filter):
return ",".join(dt.isoformat() for dt in dttm_filter)
```

**Steps to reproduce**
Configure Airflow with a non-UTC default timezone, for example Asia/Seoul.
Create a Dag with an ExternalTaskSensor waiting for another Dag.
Run the sensor task.
Observe the poke log message.

### What you think should happen instead?

The poke log should make the timezone easier to understand, ideally by formatting the datetime consistently with Airflow's configured timezone or by otherwise making clear that the value is the external Dag run `logical_date`.

This would reduce confusion when operators compare the sensor poke log with Airflow UI timestamps or local operational time.

### Operating System

_No response_

### Deployment

None

### Apache Airflow Provider(s)

_No response_

### Versions of Apache Airflow Providers

_No response_

### Official Helm Chart version

Not Applicable

### Kubernetes Version

_No response_

### Helm Chart configuration

_No response_

### Docker Image customizations

_No response_

### Anything else?

_No response_

### Are you willing to submit PR?

- [x] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Research direction

Start at the ExternalTaskSensor `_serialize_dttm_filter` code path described in the issue and reproduce the poke log with a non-UTC default timezone such as Asia/Seoul. Define the log output so the external DAG run logical_date is unambiguous, then verify the resulting message against the configured timezone and the task log timestamps.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.