Created
June 30, 2025 08:02
-
-
Save maptv/a77a773260cf2c5883371e11ee72e7d0 to your computer and use it in GitHub Desktop.
Fractional day time-of-day (tod) to hour-minute-second (hms) triplet
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
def tod_to_hms(tod): | |
hour, remainder = divmod(tod * 86400, 3600) | |
return int(hour), *map(int, divmod(remainder, 60)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment