轉:https://www.php.cn/java-article-417006.html
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");// HH:mm:ss
//獲取當前時間
Date date = new Date(System.currentTimeMillis());
time1.setText("Date獲取當前日期時間"+simpleDateFormat.format(date));