fix datetime math for determining "stuck" tasks