Last active
March 4, 2020 15:58
-
-
Save mark-mishyn/5a47a02992c2a81efe2c42d12d6f1e8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
def seconds_to_iso8601_duration(seconds: int) -> str: | |
return datetime.utcfromtimestamp(seconds).strftime('PT%HH%MM%SS') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment