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:

In[1]:=
Click for copyable input
Out[1]=

Find the current local time in Paris:

In[2]:=
Click for copyable input
Out[2]=

Get a list of all current times in Russia:

In[3]:=
Click for copyable input
Out[3]=

See Also

TimeZoneConvert  TimeObject  DateObject  TimeZone  DateString  DateList  DayName  Now  SiderealTime

Introduced in 2014
(10.0)