dstandish commented on code in PR #24284:
URL: https://github.com/apache/airflow/pull/24284#discussion_r891422956
##########
airflow/utils/json.py:
##########
@@ -45,7 +45,7 @@ def __init__(self, *args, **kwargs):
def _default(obj):
"""Convert dates and numpy objects in a json serializable format."""
if isinstance(obj, datetime):
- return obj.strftime('%Y-%m-%dT%H:%M:%SZ')
+ return obj.isoformat()
Review Comment:
this seems to produce different output:
```
pendulum.now().timestamp()
1654540994.520137
from datetime import datetime
now = datetime.utcnow()
now.strftime('%Y-%m-%dT%H:%M:%SZ')
'2022-06-07T16:05:10Z'
now.isoformat()
'2022-06-07T16:05:10.271025'
```
do you think it matters?
--
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]