LocalTime
gives a DateObject corresponding to the current local time at the current geo location.
LocalTime[loc]
gives the current local time at the geo location specified by loc.
LocalTime[loc,time]
gives the local time corresponding to the date object time at the geo location loc.
LocalTime[loc,time,func]
uses func to determine what to return for extended geographic regions.
Details
- The geo location loc can be specified by a GeoPosition object or by giving an appropriate Entity object.
- LocalTime by default returns a DateObject in the time zone corresponding to loc.
- TimeZoneConvert can be used to obtain results for other time zones.
- Possible settings for func include:
-
Automatic (default) result for significant point in region (e.g. capital city) Center result for geographic center of the region Min earliest time in the region Max latest time in the region List list of times in the region
Examples
open allclose allBasic Examples (4)
Scope (3)
For LocalTime[loc], loc may be any Entity expression with a location property on Earth:
For entities with extended geographic regions, LocalTime[loc] uses a significant location within the region(such as a capital city) as the default when multiple local times may be observed within the region:
For extended geographic regions, different reference points may be used when determining local time:
Properties & Relations (2)
LocalTime[] is equivalent to Now:
LocalTime[loc] gives back time in the time zone given by TimeZoneOffset[loc]:
Text
Wolfram Research (2014), LocalTime, Wolfram Language function, https://reference.wolfram.com/language/ref/LocalTime.html.
CMS
Wolfram Language. 2014. "LocalTime." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LocalTime.html.
APA
Wolfram Language. (2014). LocalTime. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LocalTime.html