SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //设置时间格式
Timestamp d = new Timestamp(System.currentTimeMillis()); //获取当前时间
String sdate=sdf.format(d);
Java实现输出当前时间,精确到秒
最新推荐文章于 2023-09-14 21:09:52 发布