Why is a sundial not a reliable way of telling the time?

You can't use a sundial in the night when its dark but you can tell the time using a sundial in daytime