First things first, use code tags:
using UnityEngine;
using System;
public class Clock : MonoBehaviour
{
public Transform hoursTransform;
public Transform minutesTransform;
public Transform secondsTransform;
const float
degreesPerHour = 30f,
degreesPerMinute = 6f,
degreesPerSecond = 6f,
fullCircle = 360f;
void Awake()
{
DateTime time = DateTime.Now;
var secondeRotation = time.Second * degreesPerSecond;
var minutesRotation = time.Minute * degreesPerMinute + secondeRotation / fullCircle;
var hoursRotation = time.Hour * degreesPerHour + minutesRotation / fullCircle;
secondsTransform.localRotation = Quaternion.Euler(0f, secondeRotation, 0f); -- this line throws the unassigned exception
minutesTransform.localRotation = Quaternion.Euler(0f, minutesRotation, 0f);
hoursTransform.localRotation = Quaternion.Euler(0f, hoursRotation, 0f);
}
}