-if ($InputUnits eq 'minutes' && RT->Config->Get('DefaultTimeUnitsToHours', $session{'CurrentUser'})) {
- $Default = sprintf '%.3f', $Default / 60
- unless $Default eq '';
+if ($Default && $InUnits eq 'hours') {
+ # 0+ here is to remove the ending 0s
+ $Default = 0 + sprintf '%.3f', $Default / 60;