获取当前时间戳
// 获取当前的时间戳
long time = new Date().getTime();
将字符串时间戳转成格式的时间字符串
Long timestrap = Long.parseLong("1534074968019");
Date date = new Date(timestrap);
String timeStr = date.toLocaleString(); // 1970-10-3 4:01:14
原文地址:https://www.cnblogs.com/CoderHong/p/9464229.html
时间: 2025-01-15 11:44:02