String time = "/Date(1423107970393+0800)/";
time = time.substring(6, 19);
Long timestamp = Long.parseLong(time);
String date = new java.text.SimpleDateFormat("yyyy-MM-dd")
.format(new java.util.Date(timestamp));
System.out.println(date);
Java 获取 Unix 时间戳
最新推荐文章于 2022-05-29 10:39:43 发布