ady624 / webCoRE

webCoRE is a web version of CoRE
GNU General Public License v3.0
249 stars 976 forks source link

Display evaluation of duration expressions in terms of the selected unit rather than milliseconds #50

Closed idpaterson closed 6 years ago

idpaterson commented 6 years ago

When a duration expression is evaluated for the purpose of scheduling, it is evaluated in terms of milliseconds. However, the same evaluation is also displayed when entering the expression. So the simple expression 1 second evaluates to 1000. The problem is far less obvious when math and variables are involved.

is it 1 or 1000

This pull request changes all duration units to milliseconds on the frontend when calculating this expression for display. I was not able to find any cases where this problem affects other expressions.

1 == 1 so that's better

This has been reported numerous times: