Time calculations in Better logic

Use the $timenow$ with a MathJS card and covert the epoch time to mins.

use 2 flows with the

execute mathJS card

with $timenow$ to a betterlogic variable for SunEvent1 & SunEvent2.
Then to calculate the difference rounded to the nearest minutes

round(($SunEvent2$ - $SunEvent1$)/60)