叶王博客

Test

import java.util.*; import java.text.*; SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); long lastTime = 1564976716; int beforeTime = 0; Date dNow = new Date(lastTime * 1000); System.out.println("当前时间为: " + ft.format(dNow)); 当前时间为: 2019-08-05 11:45:16 double lastTimestamp