LocalTime

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)
    Centerresult for geographic center of the region
    Minearliest time in the region
    Maxlatest time in the region
    Listlist of times in the region

Examples

Basic Examples  (1)

Get the current local time:

Find the current local time in Paris:

Get a list of all current times in Russia:

Wolfram Research (2014), LocalTime, Wolfram Language function, https://reference.wolfram.com/language/ref/LocalTime.html.

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

BibTeX

@misc{reference.wolfram_2023_localtime, author="Wolfram Research", title="{LocalTime}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/LocalTime.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_localtime, organization={Wolfram Research}, title={LocalTime}, year={2014}, url={https://reference.wolfram.com/language/ref/LocalTime.html}, note=[Accessed: 18-March-2024 ]}