I got a date/time format data from http://earthquake.usgs.gov/earthquakes/feed/geojson/all/hour
here's a quote of data:
"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,"
},
but when I use:
Date date1 = new Date();
date1.setTime("1343795877");
the result is: Fri Jan 16 13:16:35 GMT+00:00 1970 but the correct date is Wednesday, August 01, 2012 04:37:57 UTC (from CSV version of the same website)
How can I get the correct time??