//获取当前时间2 Calendar c = Calendar.getInstance(); String year = c.get(Calendar.YEAR)+""; String month = c.get(Calendar.MONTH)+""; String day = c.get(Calendar.DAY_OF_MONTH)+""; String hour = c.get(Calendar.HOUR_OF_DAY)+""; String minute = c.get(Calendar.MINUTE)+""; String second = c.get(Calendar.SECOND)+""; currTimeStr = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second;
效果:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)