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

   ### Apache Airflow version
   
   2.4.3
   
   ### What happened
   
   In the case when the DAG starts at the moment when the number of 
milliseconds is 0, 
   then {{ ts }} macros the time format is %Y-%m-%dT%H:%M:%S%z
   in the case when the number of milliseconds is not equal to 0, 
   the time format is %Y-%m-%dT%H:%M:%S.%f%z
   
   Therefore it breaks work with macro `macros.ds_format`
   
   ### What you think should happen instead
   
   The case when the number of milliseconds is equal to 0, should be in the 
time format %Y-%m-%dT%H:%M:%S.%f%z
   
   ### How to reproduce
   
   1. Create DAG with only one BashOperator
   ```
   bash_task = BashOperator(
       task_id="bash_task",
       bash_command='echo "Here is the message: {{ macros.ds_format(ts, 
'"%Y-%m-%dT%H:%M:%S.%f%z'", '"%Y/%m/%d/%H'") }}"',
   )
   ```
   2. Create DAG with schedule each ten(for example) minutes 
   3. Run DAG manual at an arbitrary point in time
   
   ### Operating System
   
   macOs 12.6
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### 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]

Reply via email to