Skip to content

Commit

Permalink
Fix time argument formatting to include time zone (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalmarhubi committed Mar 29, 2024
1 parent 32770a1 commit ac0e53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python_on_whales/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def format_time_arg(time_object):

def format_time_for_docker(time_object: Union[datetime, timedelta]) -> str:
if isinstance(time_object, datetime):
return time_object.strftime("%Y-%m-%dT%H:%M:%S")
return time_object.isoformat()
elif isinstance(time_object, timedelta):
return f"{time_object.total_seconds()}s"

Expand Down

0 comments on commit ac0e53b

Please sign in to comment.