Current Local Time Worldwide

Look up the current time in every city in our database, which currently comprises more than 3300 cities and is extended on a regular basis. It is also possible to query the current time for any location on Earth by using geographic coordinates.

Locations can be queried by:

  • Location id (obtained by Places Service).
  • Name of place or country (textual search).
  • Geographic coordinates (longitude and latitude).

A single query can return results for up to 200 locations.

The service provides the following data:

  • Current time.
  • Full city name, state (if available), and country.
  • Geographic coordinates.
  • Current time zone and offset to Coordinated Universal Time (UTC).
  • Time changes in current year (daylight saving time begin and end).
  • Sunrise and sunset times for current day.

Data coverage

Browse supported locations

List all supported countries

Sample Data

Example Request: https://api.xmltime.com/timeservice?placeid=187&version=2&out=json&prettyprint=1&accesskey={KEY}&expires={TIMESTAMP}&signature={SIGNATURE}

{
  "version": 2,
  "locations": [{
    "id": 187,
    "geo": {
      "name": "Oslo",
      "country": {
        "id": "no",
        "name": "Norway"
      },
      "latitude": 59.913,
      "longitude": 10.740
    },
    "time": {
      "iso": "2011-11-09T09:00:51+01:00",
      "datetime": {
        "year": 2011,
        "month": 11,
        "day": 9,
        "hour": 9,
        "minute": 0,
        "second": 51
      },
      "timezone": {
        "offset": "+01:00",
        "zoneabb": "CET",
        "zonename": "Central European Time",
        "zoneoffset": 3600,
        "zonedst": 0,
        "zonetotaloffset": 3600
      }
    },
    "timechanges": [{
      "newdst": 3600,
      "newzone": null,
      "newoffset": 7200,
      "utctime": "2011-03-27T01:00:00",
      "oldlocaltime": "2011-03-27T02:00:00",
      "newlocaltime": "2011-03-27T03:00:00",
      "verbose": {
        "utctime": {
          "datetime": {
            "year": 2011,
            "month": 3,
            "day": 27,
            "hour": 1,
            "minute": 0,
            "second": 0
          }
        },
        "oldlocaltime": {
          "datetime": {
            "year": 2011,
            "month": 3,
            "day": 27,
            "hour": 2,
            "minute": 0,
            "second": 0
          }
        },
        "newlocaltime": {
          "datetime": {
            "year": 2011,
            "month": 3,
            "day": 27,
            "hour": 3,
            "minute": 0,
            "second": 0
          }
        }
      }
    },{
      "newdst": 0,
      "newzone": null,
      "newoffset": 3600,
      "utctime": "2011-10-30T01:00:00",
      "oldlocaltime": "2011-10-30T03:00:00",
      "newlocaltime": "2011-10-30T02:00:00",
      "verbose": {
        "utctime": {
          "datetime": {
            "year": 2011,
            "month": 10,
            "day": 30,
            "hour": 1,
            "minute": 0,
            "second": 0
          }
        },
        "oldlocaltime": {
          "datetime": {
            "year": 2011,
            "month": 10,
            "day": 30,
            "hour": 3,
            "minute": 0,
            "second": 0
          }
        },
        "newlocaltime": {
          "datetime": {
            "year": 2011,
            "month": 10,
            "day": 30,
            "hour": 2,
            "minute": 0,
            "second": 0
          }
        }
      }
    }],
    "astronomy": {
      "objects": [{
        "name": "sun",
        "events": [{
          "type": "rise",
          "hour": 7,
          "minute": 58
        },{
          "type": "set",
          "hour": 16,
          "minute": 3
        }]
      }]
    }
  }]
}

Example Request: https://api.xmltime.com/timeservice?placeid=norway%2Foslo&version=2&out=xml&prettyprint=1&accesskey={KEY}&expires={TIMESTAMP}&signature={SIGNATURE}

<?xml version="1.0" encoding="UTF-8"?>
<data version="2">
  <location id="187">
    <geo>
      <name>Oslo</name>
      <country id="no">Norway</country>
      <latitude>59.913</latitude>
      <longitude>10.740</longitude>
    </geo>
    <time iso="2011-11-09T09:01:26+01:00">
      <datetime>
        <year>2011</year>
        <month>11</month>
        <day>9</day>
        <hour>09</hour>
        <minute>01</minute>
        <second>26</second>
      </datetime>
      <timezone offset="+01:00">
        <zoneabb>CET</zoneabb>
        <zonename>Central European Time</zonename>
        <zoneoffset>3600</zoneoffset>
        <zonedst>0</zonedst>
        <zonetotaloffset>3600</zonetotaloffset>
      </timezone>
    </time>
    <timechanges>
      <change newdst="3600" newzone="" newoffset="7200" utctime="2011-03-27T01:00:00" oldlocaltime="2011-03-27T02:00:00" newlocaltime="2011-03-27T03:00:00">
        <utctime>
          <datetime>
            <year>2011</year>
            <month>3</month>
            <day>27</day>
            <hour>01</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </utctime>
        <oldlocaltime>
          <datetime>
            <year>2011</year>
            <month>3</month>
            <day>27</day>
            <hour>02</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </oldlocaltime>
        <newlocaltime>
          <datetime>
            <year>2011</year>
            <month>3</month>
            <day>27</day>
            <hour>03</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </newlocaltime>
      </change>
      <change newdst="0" newzone="" newoffset="3600" utctime="2011-10-30T01:00:00" oldlocaltime="2011-10-30T03:00:00" newlocaltime="2011-10-30T02:00:00">
        <utctime>
          <datetime>
            <year>2011</year>
            <month>10</month>
            <day>30</day>
            <hour>01</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </utctime>
        <oldlocaltime>
          <datetime>
            <year>2011</year>
            <month>10</month>
            <day>30</day>
            <hour>03</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </oldlocaltime>
        <newlocaltime>
          <datetime>
            <year>2011</year>
            <month>10</month>
            <day>30</day>
            <hour>02</hour>
            <minute>00</minute>
            <second>00</second>
          </datetime>
        </newlocaltime>
      </change>
    </timechanges>
    <astronomy>
      <object name="sun">
        <event type="rise" hour="07" minute="58"/>
        <event type="set" hour="16" minute="03"/>
      </object>
    </astronomy>
  </location>
</data>
Terms & Conditions Copyright © Time and Date AS
All data supplied by timeanddate.com