获取系统当前时间

来源:互联网 发布:oracle dblink mysql 编辑:程序博客网 时间:2024/06/03 23:43
//获取系统当前时间

    private void setdates() {
        SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy年MM月dd日  HH:mm:ss");
        Date date=new Date(System.currentTimeMillis());
        String str2 = dateFormat.format(date);
        t_date.setText(str2);
        t_date.setTextSize(20);
        Log.i(TAG, str2+"...");
    }

0 0
原创粉丝点击