How this calculation works
Add or subtract a duration from a clock time and see both the resulting 24-hour time and the day offset. The offset prevents a midnight crossing from being hidden. Use this for clock arithmetic; because no date or time zone is supplied, it cannot account for daylight-saving transitions.
Worked example
This example uses illustrative inputs. Your current result is shown above.
Start at 23:30:00 and add 2 hours, 0 minutes and 0 seconds. The unwrapped total is 25:30:00, so the clock result is 01:30:00 and the day offset is +1.
Assumptions and limits
- Use a 24-hour starting time; duration minutes and seconds run from 0 to 59.
- Every modelled day is exactly 24 hours and no daylight-saving adjustment is made.
- A negative day offset means the resulting clock time belongs to an earlier calendar day.
Questions people ask
What does a day offset of −1 mean?
The calculation crossed midnight backward. Pair the displayed time with the previous date rather than reading it as later on the starting day.
Can I add more than 24 hours?
Yes. The hours field can span multiple days, and the separate day-offset result records the full number of midnight boundaries.