Android获取当前系统日期和时间

转: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));

原文地址:https://www.cnblogs.com/CipherLab/p/14181772.html