If you look at the time on a sundial, it is unlikely it agrees with a standard clock. (Even if it does agree at some particular time of year, a month or two later it won't.) There are 5 factors which make up the difference between sundial time (or solar time) and standard time.
The easiest one to understand is Daylight Saving Time. We move the little hand of the clock forward or backward by one hour, at pretty arbitrary times of the year; the sun obviously does not jump to a different place in the sky on those particular dates. The first step in converting between solar time and standard time is to take DST into account as necessary.
Second, near sunrise and sunset, refraction of the sun's rays by the atmosphere will cause the time on the sundial to be incorrect. When the sun is horizontal, the rays from the sun hitting the sundial are actually slanting down slightly (i.e. the sun appears to be above the horizon, whereas on an airless planet it would be on the horizon). This means near dawn the sundial will say it's later than it actually is (e.g. the sundial will say the sun rises on the equinox at 6am, which would be correct except the sun appears to rise when it's still really slightly below the horizon!), and near dusk the sundial will say it's earlier than it actually is. I'm not sure if there's a good formula for this adjustment; the effect is small, and it's generally ignored, it's just something that a scientist and pedant likes to keep in mind.
The third factor is that the Earth is curved and longitude is a continuous value but time zones are discrete. At the longitude of Greenwich (0°, the prime meridian), the mean solar time coincides with the standard time. In fact, mean solar time at the Royal Greenwich Observatory is defined to be the standard time, Greenwich Mean Time, which is internationally recognised to be a world standard for time. 15 degrees East of Greenwich is in a time zone 1 hour 'later', and again standard time coincides with mean sundial time. 10 degrees East of Greenwich, sundial time is 40 minutes later than at Greenwich, but is in a time zone 1 hour later; so the mean solar time is 20 minutes different from the standard time. So, at the exact centre of a time zone, the mean solar time and clock are in agreement, but the further you go from the centre, the more they disagree. There's a difference of 4 minutes from GMT for each degree of longitude difference from Greenwich, so if you know your precise longitude and how many hours difference there is between your time zone and GMT, this is an easy adjustment to make.
The final two factors are the more interesting ones, they are how actual sundial time differs from mean solar time throughout the year. The Earth does not orbit in a perfect circle around the sun. (About the 3rd of January, the Earth is the closest to the Sun it gets - this is called perihelion. Anout the 5th of July, half a year later, the Earth is at aphelion - the furthest from the sun.) Also, the spin of the Earth is tilted relative to the ecliptic. (This gives us solstices and equinoxes, and seasons.) Both of these details affect sundial time through the year.
According to Kepler's Laws (which are not the most accurate model of orbital mechanics, but are sufficiently accurate for this discussion), the Earth has a larger angular speed in its orbital path at perihelion than at aphelion. This means that the sun moves slightly faster across the celestial sphere, as viewed from the Earth. The spin of the Earth and the orbit of the Earth are both anticlockwise as viewed from North of the ecliptic; this means that the celestial sphere appears to spin East-to-West in one (sidereal) day as viewed from the Earth's surface, and the sun makes one revolution West-to-East on the celestial sphere in one (sidereal) year. The sun's motion through the celestial sphere is opposite the apparent motion of the celestial sphere itself as observed from the ground, so when the sun is moving faster relative to the celestial sphere it really moves slower across the sky and it takes longer to make a full circuit. In other words, a solar day (noon sundial time to noon sundial time) is slightly longer when the Earth is near perihelion and slightly shorter when the Earth is near aphelion. (On a planet which spins slowly enough, with an eccentric enough orbit, the sun may reverse its direction in the sky - move from West to East! - for part of a day at perihelion.) This is obviously different from mechanical or electronic clocks, designed to have a constant period between corresponding times on successive days!
The effect of the Earth's orbital eccentricity is to 'slow' the sundial clock, and speed it up, in a regular way; the period of this effect is one anomalistic year. The effect is about 7.5 seconds difference per day maximum, and the maximum deviation from mean time from this effect is about seven and a half minutes.
The tilt of the Earth's axis relative to its orbit also plays a role. The sun follows a circular path around the celestial sphere making one revolution in one year; that circle is called the ecliptic. The ecliptic is at an angle of 23.5° to the celestial equator. The sun is on the celestial equator at the equinoxes, and every place on Earth (except the poles) experiences 12 hours of daylight and 12 hours of night at those times. However, at the same time, the sun is moving the fastest relative to the celestial equator. (Imagine swinging on a swing, when you're at the bottom of the swing your angle is zero to the vertical, but it's when you're moving the fastest.) After the equinox, the sun departs from the celestial equator. At the solstice, the sun is furthest from the celestial equator but is not moving relative to it. (At the highest point on the swing, you're the furthest from vertical, but for a moment you're still - neither moving towards vertical nor away from it.) At the equinox, then, the motion of the Sun has a North-South component to it so not all the motion is West-to-East. This means the sun moves slower in the East-West direction near the equinoxes. At the solstice, by comparison, not only is there no North-South component to the motion of the sun, but the East-West motion is nearer the poles, where lines of latitude (or right ascension) are closer together. This means the sun moves faster in the East-West direction near the solstices. This means the days are shorter near the solstices and longer near the equinoxes.
The effect of the Earth's axial inclincation is to 'slow' the sundial clock, and speed it up, in a regular way; the period of this effect is half a tropical year. The effect is about 5 seconds difference per day maximum, and the maximum deviation from mean time from this effect is about ten minutes.
Note that there are special gnomons available for some sundials which are shaped in such a way as to take into account the last two variations in sundial time described. One gnomon is used from Winter solstice to Summer solstice, the other gnomon is used from Summer solstice to Winter solstice.
The effects of tilt and eccentricity do not line up exactly, so the largest difference between sundial time and mean sundial time is about sixteen and a half minutes. It is interesting to consider that the anomalistic year is not the same as the tropical year (and neither is the same as the sidereal year). Thousands of years in the future, the sundial will lag and lead by different amounts and at different times of the year.