Correct alarm time calculation