long now = android.os.SystemClock.uptimeMillis(); AspLog.d(TAG, "now--"+String.valueOf(now)); /* long currentSeconds = System.currentTimeMillis()/1000; long currentthree = System.currentTimeMillis(); AspLog.d(TAG, "now--"+String.valueOf(now)); AspLog.d(TAG, "currentSeconds--"+String.valueOf(currentSeconds)); AspLog.d(TAG, "currentthree--"+String.valueOf(currentthree)); SimpleDateFormat formatter=new SimpleDateFormat("yyyyMMddHHmmss"); Date curDate=new Date(System.currentTimeMillis());//获取当前时间 String str=formatter.format(curDate); AspLog.d(TAG, "str--"+String.valueOf(str)); SimpleDateFormat haha=new SimpleDateFormat("MM月dd日 HH:mm"); Date hahahha=new Date(System.currentTimeMillis());//获取当前时间 String hahhahaha=formatter.format(hahahha); AspLog.d(TAG, "hahhahaha--"+String.valueOf(hahhahaha));*/
java时间程序,java中的时间
最新推荐文章于 2022-08-24 16:34:28 发布