how do you calculate base 60 pertaining to a clock? (not a timer)

How do I find the difference in times pertaining to a clock?

i.e.
11:30 - 1345 = 2h 15min

It doesn't have to be in that format but it does have to be using base60

It is for a scheduler that must know the difference between am and pm and that's it.

make function that can format time output from absolute seconds. Or minutes whatever you want as you’re resolution. Then just do everything in that unit. Then let your format function deal with showing the user in “time” form.

-jim lee

Nothing in the library datetime will work. We have already established this.

No, you didn't establish it. You just didn't succeed.

The way to do this using the DateTime library, is to use makeTime() and breakTime(). Convert the times you need to subtract to 32 bit time_t values using makeTime(), simply subtract or add them, and then convert back to calendar time using breakTime().

It might be more than you need, but it does work.

@rabbitrevenge when were you born? Just own your mistakes, do not attempt to edit them out of existence.

Srsly. It’s 2021.

a7

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.