首页 > 技术文章 > java打印系统时间

THEONLYLOVE 2018-05-31 17:00 原文

public class Time {
public static void main(String[] args) {
Date t = new Date();
DateFormat ti = new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss");
String s = ti.format(t);
System.out.println("现在是佛山时间:"+s);
}
}

推荐阅读