Time operations: 12:30 minus 11:30 is 11 hours instead of 1

Hi everyone! How knows why when I’m making calculations with time like 11:30 - 10:30 it’s 1 hour and at 12:30 - 11:30 it’s 11 hours instead of 1? :exploding_head:
I’m Using Air TimeDropper and 24 hours format

This result I have only with if the time values are more and less than 12:00
e.g.
Снимок экрана 2020-10-27 в 21.46.20
minus
Снимок экрана 2020-10-27 в 21.46.11
is
Снимок экрана 2020-10-27 в 21.46.30 mins, not 2 hours

Hi, @anton2demin.

12:31am is 31 minutes past midnight. 10:31 am is 10 hours later, i.e. 600 minutes.
I’m not sure why the result isn’t -600 minutes but it’s probably that you’re displaying the number without a minus sign.

12:31pm minus 10:30am would give you a difference of 120 minutes or 2 hours.

Hi, @laurence.

Thanks! Found a problem - Air TimeDropper are saving 12:30 am instead of 12:30 pm when user are choosing 12:30 in 24hours format. I’ll try to solve it
UPD: just plus 12 hours if Air TimeDropper consist “12:” in value

1 Like

You’re encountering a common problem with free plugins. They aren’t always up to professional standards and sometimes the developer is inclined to lose interest and disappear.
I am in the process of replacing Air Date/Time picker throughout my app. Even though no known change has been made to the plugin, two or three weeks ago it began sporadically producing empty results (value) even when the user picks a date.

This is the kind of behavior that changes “free” to expensive. Very expensive.

Best of success in your Bubble experience.

This topic was automatically closed after 70 days. New replies are no longer allowed.