【发布时间】:2015-09-23 04:06:56
【问题描述】:
问题来了
我从 API 获取数据为
curl "http://api.timezonedb.com/?lat=53.7833&lng=-1.75&key=OXFVZEHUDERF&format=json"
{"status":"OK","message":"","countryCode":"GB","zoneName":"Europe\/London","abbreviation":"BST","gmtOffset":"3600","dst":"1","timestamp":1442983759}Harits-MacBook-Pro-2:~ harit$ curl "http://api.timezonedb.com/?lat=-44.490947&lng=171.220966&key=API_KEY&format=json"
结果为
{"status":"OK","message":"","countryCode":"NZ","zoneName":"Pacific\/Auckland","abbreviation":"NZST","gmtOffset":"43200","dst":"0","timestamp":1443023417}
根据他们的docs,timestamp 是
Unix 时间戳中的当前本地时间。
如何打印成
2013-07-10T14:52:49
在那个时区Europe/London?
【问题讨论】: