HumanIearning opened a new issue, #40292:
URL: https://github.com/apache/airflow/issues/40292

   ### Apache Airflow version
   
   2.9.2
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   I don't know exactly it's bug, but I think it's weird
   execution date in dag task context is different from when dag is run by 
manually and scheduler
   
   ### when triggered
   Marking task as UP_FOR_RETRY. dag_id=crawling_dag, 
task_id=process_goods_info_html, 
run_id=manual__2024-06-18T10:07:49.528041+00:00, 
execution_date=20240618T100749, start_date=20240618T100751, 
end_date=20240618T100751
   
   ### when scheduled
   Marking task as SUCCESS. dag_id=crawling_dag, 
task_id=process_goods_info_html, run_id=scheduled__2024-06-17T09:54:00+00:00, 
execution_date=20240617T095400, start_date=20240618T095402, 
end_date=20240618T095402
   
   
   it looks that execution_date is same
   but when print them
   
   ### when triggered
   2024-06-18 10:07:49.528041+00:00
   
   ### when scheduled
   2024-06-17 10:17:00+00:00
   
   ### What you think should happen instead?
   
   both format should be same
   
   ### How to reproduce
   
   ```py
   date_format = "%Y-%m-%d %H:%M:%S%z"
   date = kwargs["execution_date"]
   print(str(date))
   date = datetime.datetime.strptime(str(date), date_format).date()
   ```
   
   ### Operating System
   
   PRETTY_NAME="Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-celery==3.7.2
   apache-airflow-providers-common-io==1.3.2
   apache-airflow-providers-common-sql==1.14.0
   apache-airflow-providers-fab==1.1.1
   apache-airflow-providers-ftp==3.9.1
   apache-airflow-providers-http==4.11.1
   apache-airflow-providers-imap==3.6.1
   apache-airflow-providers-smtp==1.7.1
   apache-airflow-providers-sqlite==3.8.1
   
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   use docker on mac
   use `docker compose up`
   
   ### modified some env
   \#  image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.9.2}
     build: .
   ### add env
   AIRFLOW__CORE__DEFAULT_TIMEZONE: 'Asia/Seoul'
   
   ### 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-unsubscr...@airflow.apache.org.apache.org

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

Reply via email to