This grasshopper definition generates the position of ecliptic and sun for a given time, timezone and date at a given position on earth. The real position of the sun deviates from this position by approx. +/- 15 min. The reason is the eccentricity of the earths's orbit around the sun. (see equation of time).
Download the grasshopper definition here