gives the angle on the celestial equator between the Sun and the local antimeridian for the current location and date.
SolarTime[loc]
gives the solar time angle for the specified location and current date.
SolarTime[date]
gives the solar time angle for the specified date and current location.
SolarTime[loc,date]
gives the solar time for the specified location and date.
SolarTime["MeanTime",loc,date]
gives the mean solar time for the specified location and date.


SolarTime
gives the angle on the celestial equator between the Sun and the local antimeridian for the current location and date.
SolarTime[loc]
gives the solar time angle for the specified location and current date.
SolarTime[date]
gives the solar time angle for the specified date and current location.
SolarTime[loc,date]
gives the solar time for the specified location and date.
SolarTime["MeanTime",loc,date]
gives the mean solar time for the specified location and date.
Details

- Solar time is typically used when precise orientation with respect to the Sun is required, for example, in applications of solar energy, solar trackers and heliostats.
- SolarTime gives an angle determined by a sundial from the given location at the given date.
- SolarTime returns a Quantity angle expressed in mixed units of hours, minutes and seconds of right ascension, as traditionally done with angles measured along the celestial equator.
- SolarTime[loc,date], equivalent to SolarTime["ApparentTime",loc,date], computes the local apparent or true solar time, based on the celestial position of the true Sun, which moves at irregular speed along the celestial equator.
- SolarTime["MeanTime",loc,date] computes local mean solar time, based on the position of the fictitious mean Sun, which moves at constant speed along the celestial equator.
- SolarTime["EquationOfTime",loc,date] computes the equation of time for the given location and date, defined as SolarTime["ApparentTime",loc,date]-SolarTime["MeanTime",loc,date].
- SolarTime[loc,date] is equivalent to the difference between the sidereal time of the antipode of loc at date and the right ascension of the Sun for the same date.
- SolarTime[] makes use of Here and Now to determine your current location and date.
- Locations in SolarTime[loc,date] can be given as {lat,lon} pairs in degrees, GeoPosition objects or Entity geo locations.
- Date specifications in SolarTime[loc,date] can be given as DateObject expressions or date strings. Input dates are assumed to be given in Universal Time, modified by your local time zone as given by $TimeZone.
Examples
open all close allBasic Examples (2)
Scope (5)
Find the current apparent solar time for your location:
It can also be computed as follows:
Find the current mean solar time for your location:
Find the current value of the equation of time for your location:
It is defined as the difference between true solar time and mean solar time:
Use locations in different formats:
Specify dates as DateObject expressions or date lists:
Properties & Relations (10)
For a given location and date, solar time can also be computed from AstroPosition:
Locations with the same longitude have similar solar time:
Each 15 degrees of longitude correspond to about one hour of solar time:
Solar time is not defined at the poles, because longitude is not uniquely defined at the poles:
Mean solar time for Greenwich was the basis for GMT time:
However, it does not coincide in general with true solar time at Greenwich:
This is the current time at that location, with the unique time zone GMT+8 used in China:
It is shifted by more than two hours with respect to the corresponding solar time:
Compute the sidereal time of the antipode of that location, for that date:
Compute the right ascension of the Sun for that location and date:
Then the solar time is equivalent to this difference, modulo full angles:
The equation of time, defined as the difference between apparent and mean solar times, varies during a year:
Find the minimum and maximum of the values of the equation of time:
The shape of the equation of time varies across millennia:
Take a location in the Northern Hemisphere and a given date:
The Sun reaches its highest altitude at upper culmination, crossing the meridian at that location:
Upper culmination defines the instant of solar noon, corresponding to 12 hours of solar time:
The Sun at this moment has azimuth 180 degrees, as observed from that location:
Solar noon and civil noon can be far apart:
Take all civil noons during a year, ignoring daylight saving changes:
Compute the corresponding solar noons for your location:
Find the durations of all solar days during a year:
The duration varies during the year, with longer days in June and December and shorter days in March and September:
Related Guides
History
Text
Wolfram Research (2021), SolarTime, Wolfram Language function, https://reference.wolfram.com/language/ref/SolarTime.html.
CMS
Wolfram Language. 2021. "SolarTime." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SolarTime.html.
APA
Wolfram Language. (2021). SolarTime. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SolarTime.html
BibTeX
@misc{reference.wolfram_2025_solartime, author="Wolfram Research", title="{SolarTime}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/SolarTime.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_solartime, organization={Wolfram Research}, title={SolarTime}, year={2021}, url={https://reference.wolfram.com/language/ref/SolarTime.html}, note=[Accessed: 15-August-2025]}