nick-lennox opened a new issue, #54466: URL: https://github.com/apache/airflow/issues/54466
### Apache Airflow version 3.0.4 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? DAG params of format `date-time` results in unexpected behavior when attempting to set the param value via the UI. I've attached a clip that outlines the problem; when a time is set using the date-time picker, 4 hours is automatically added to the user-inputted time. Then, once a user is done selecting the time and the date-time picker UI component is hidden, another four hours is added to the date-time. When I made this clip I was using the default `utc` timezone. I have also tested this with `America/New_York` default_timezone and was successfully able to reproduce the problem. https://github.com/user-attachments/assets/c3d6c8a0-9ef9-4710-8ea4-f6319125a28e ### What you think should happen instead? I would expect the user-inputted time to be used. I would think the UI should be config-aware and assume the inputted time is in the `default_timezone` tz. Instead, it seems like there is some timezone conversion happening within the UI component which results in an incorrect value in the `params`. ### How to reproduce I was able to reproduce the bug with this minimal DAG: ``` from airflow.sdk import DAG, Param, task from datetime import datetime with DAG( "test_date_time", dag_display_name="Test Date-Time Param", catchup=False, start_date=datetime(2025, 7, 1), schedule=None, params={ "my_datetime": Param(type="string", format="date-time"), }, ) as dag: @task def output_my_datetime(**context): datetime_dag_param = context["params"]["my_datetime"] print(f"Raw dt: {datetime_dag_param}") return datetime_dag_param output_my_datetime() ``` ### Operating System macOS Sequoia 15.4.1 ### Versions of Apache Airflow Providers No providers necessary to reproduce. ### Deployment Astronomer ### Deployment details We discovered the issue in our deployment which uses `America/New_York` as the core configuration `default_timezone`, however we were also able to reproduce using the `utc` tz. ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] 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) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
