Trying to rotate a 2D sprite

I’ve got this code attached to a 2D sprite that I want to rotate. So far I’m working on making it rotate left when the left arrow key is pressed. I get no parsing errors, but when I run the game, the code doesn’t work. Any idea what I’m doing wrong?

using UnityEngine;
using System.Collections;

public class Rotate : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

		if (Input.GetButtonDown ("left"))
			RotateLeft();
	}

	void RotateLeft () {
		Quaternion theRotation = transform.localRotation;
		theRotation.z *= 270;
		transform.localRotation = theRotation;
	}
}

void RotateLeft () {
transform.Rotate (Vector3.forward * -90);
}

Instead of subtracting 90 from the forward direction, you can use Vector3.forward and vector3.back:

//rotate counterclockwise
transform.Rotate (Vector3.forward);

//rotate clockwise
transform.Rotate (Vector3.back);