2014-11-06 81 views

回答

0

Instagram返回Unix time stamp中的日期,以便转换时无效的日期。解决办法是我们需要multiple 1000 with created_time标记值。

这是代码:

String x = "1414678736"; // created_time tag value goes here. 
long foo = **Long.parseLong(x)*1000;** 
Date date = new Date(foo); 
DateFormat formatter = new SimpleDateFormat("MMMM dd,yyyy"); 
System.out.println(formatter.format(date)); 
相关问题