全球时间查询
世界主要城市时间查询

接口地址: https://api.qsir.cn/api/dm-worldtime

返回格式: JSON

请求方式: GET/POST

请求示例: https://api.qsir.cn/api/dm-worldtime?city=上海

即2023年9月1号起,所有接口请求必须携带秘钥,否则请求失败!!

请求参数说明:

名称 必填 类型 说明
city String 城市

返回参数说明:

名称 类型 说明
country String 所在国家
encountry String 国家英文
city String 城市
encity String 城市英文
timeZone String 时区
countrycode String 国家电话代码
nowmonth String 月份
ennowmonth String 月份英文
week String 星期
enweek String 星期英文
weeknum String 星期数字
noon String 时刻
ennoon String 时刻英文
summertime int 夏令时制度,0否、1是
timestamp int 时间戳
strtime String 字符串时间

返回示例:

{
  "code": 200,
  "msg": "success",
  "result": {
    "country": "中国",
    "encountry": "China",
    "city": "上海",
    "encity": "Shanghai",
    "timeZone": "GMT+8",
    "countrycode": "86",
    "nowmonth": "三",
    "ennowmonth": "Mar",
    "week": "四",
    "enweek": "Thu",
    "weeknum": "4",
    "noon": "下午",
    "ennoon": "PM",
    "summertime": 0,
    "timestamp": 1648711528,
    "strtime": "2022-03-31 15:25:28"
  }
}

请求参数设置:

参数名称 参数值


{
  "code": 200,
  "msg": "success",
  "result": {
    "country": "中国",
    "encountry": "China",
    "city": "上海",
    "encity": "Shanghai",
    "timeZone": "GMT+8",
    "countrycode": "86",
    "nowmonth": "三",
    "ennowmonth": "Mar",
    "week": "四",
    "enweek": "Thu",
    "weeknum": "4",
    "noon": "下午",
    "ennoon": "PM",
    "summertime": 0,
    "timestamp": 1648711528,
    "strtime": "2022-03-31 15:25:28"
  }
}

错误码格式说明:

名称 类型 说明
code int 成功
msg String 错误

代码示例:

暂无示例。