← 地理与天气

时区查询

GET /geo/timezone

通过地理坐标或时区名称查询时区信息。返回时区标识符(例如 Europe/Oslo)、当前本地时间、UTC 偏移和夏令时状态。适用于需要以用户本地时区显示时间的日程安排应用、跨时区的会议规划器和在 UTC 与本地时间之间转换的任何功能。

参数

lat 可选

Latitude

lon 可选

Longitude

zone 可选

Timezone name

请求示例

基本用法
curl "https://nordapi.ee/api/v1/geo/timezone?lat=59.9&lon=10.7"
Timezone for Oslo by coordinates
curl "https://nordapi.ee/api/v1/geo/timezone?lat=59.9&lon=10.7"
Timezone by name
curl "https://nordapi.ee/api/v1/geo/timezone?zone=America/New_York"
Timezone for Tokyo by coordinates
curl "https://nordapi.ee/api/v1/geo/timezone?lat=35.68&lon=139.69"

实时响应

{
  "data": {
    "date": "04/05/2026",
    "datetime": "2026-04-05T19:24:12.0471182",
    "day_of_week": "Sunday",
    "time": "19:24",
    "timezone": "Europe/Oslo",
    "utc_offset": null
  },
  "success": true
}