Difference between transform.localRotation = Quaternion and transform.RotateAroundLocal

I know there are other questions about the difference between these two things. But I haven’t found anything regarding time.

As we all should know, if you call transform.Rotate and give an angle without scaling it using Time.deltaTime, the object rotates at insane speeds. I wanted to be able to clamp the angle of the rotation between 180 and -180. So I decided to add/subtract the rotationRate from a “currentAngle”, and then assign that rotation using a Quaternion. To my surprise, I did not need to scale the rotationRate with time to get my desired result. Anyone have any insight to this?

public class RotateCannon : MonoBehaviour
    public float rotationRate = 30f;
    float currentAngle = 0f;

    void Update()
        if (Input.GetKey(KeyCode.LeftArrow))
            currentAngle -= rotationRate;
        else if (Input.GetKey(KeyCode.RightArrow))
            currentAngle += rotationRate;
        transform.localRotation = Quaternion.Euler(0, 0, currentAngle);

Hmpf, there is a problem with the site or this question, I can’t post an answer (also, my browser deleted my first answer before posting, for the same reason). So here it is as a comment:

Your code cannot produce a “properly” rotating object, unless you modified rotationRate in the Inspector, or there really is a strobing effect (use a different rate to check for that, such as 25).

The difference to RotateAroundLocal is that your code sets the angle absolutely, overwriting/ignoring previous values, while RotateAroundLocal adds the given angle to the transform’s rotation each time you call the function.