获取电脑系统当前时间

public static String parseDate(){
  Date d = new Date();
  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  return sdf.format(d);
 }

原文地址:https://www.cnblogs.com/haichaoweiwu/p/5902058.html