我从 http://earthquake.usgs.gov/earthquakes/feed/geojson/all/hour获得了日期/时间格式数据
这是数据的引用:
"properties":{
"mag":0.5,
"place":"123km NNW of Talkeetna, Alaska",
"time":1343795877,
"tz":-480,
"url":"/earthquakes/eventpage/ak10523664",
"felt":null,
"cdi":null,
"mmi":null,
"alert":null,
"status":"AUTOMATIC",
"tsunami":null,
"sig":"4",
"net":"ak",
"code":"10523664",
"ids":",ak10523664,",
"sources":",ak,",
"types":",general-link,general-link,geoserve,nearby-cities,origin,"
},
但是当我使用时:
Date date1 = new Date();
date1.setTime("1343795877");
结果是:Fri Jan 16 13:16:35 GMT+00:00 1970 但正确的日期是 2012 年 8 月 1 日星期三 04:37:57 UTC(来自同一网站的 CSV 版本)
我怎样才能得到正确的时间?