You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "nick-lennox (via GitHub)" <gi...@apache.org> on 2025/08/13 13:55:25 UTC

[I] Date-time DAG param UI issues [airflow]

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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date-time DAG param UI issues [airflow]

Posted by "steveahnahn (via GitHub)" <gi...@apache.org>.
steveahnahn commented on issue #54466:
URL: https://github.com/apache/airflow/issues/54466#issuecomment-3194013015

   Hello, @rawwar,
   Would it be possible if you could assign me to do this? I believe I have a working solution.
   Thank you.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date-time DAG param UI issues [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #54466:
URL: https://github.com/apache/airflow/issues/54466#issuecomment-3184045793

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date-time DAG param UI issues [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on issue #54466:
URL: https://github.com/apache/airflow/issues/54466#issuecomment-3194513023

   @steveahnahn Feel free to just open a PR linked to this issue -- issues don't need to be assigned to submit a PR against it.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date-time DAG param UI issues [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on issue #54466:
URL: https://github.com/apache/airflow/issues/54466#issuecomment-3187408736

   This might be related to #54006


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date-time DAG param UI issues [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #54466: Date-time DAG param UI issues
URL: https://github.com/apache/airflow/issues/54466


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org