获得系统当前时间

	private static String currentTime(){
		Calendar c = Calendar.getInstance();  
		  System.out.println(c.getTime()); //Wed Mar 12 10:11:21 CST 2008   输出这种形式  
		  SimpleDateFormat simpleDateTimeFormat  =   new  SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );  
		  c  =  Calendar.getInstance(Locale.CHINESE);  
		  String currentTime = simpleDateTimeFormat.format(c.getTime()) ;  
		  return currentTime;
	}


你可能感兴趣的:(获得系统当前时间)