我想获得当前系统的时间值,并分开表示出来
现在获得的分钟和秒时间不对,谁能帮我看看
java.util.Date d  = new java.util.Date();
java.text.SimpleDateFormat fm= new java.text.SimpleDateFormat("yyyy-MM-dd HH:MM:SS"); //the date format
//out.print(fm);
String strDate=fm.format(d);
//out.print(strDate+strDate.length());
String year,month,day,hour,minute,second;
int ye,mo,da,ho,mi,se;
year=strDate.substring(0,4);
month=strDate.substring(5,7);
day=strDate.substring(8,10);
hour=strDate.substring(11,13);
minute=strDate.substring(14,16);
second=strDate.substring(17,18);
ye=new Integer(year).intValue();
mo=new Integer(month).intValue();
da=new Integer(day).intValue();
ho=new Integer(hour).intValue();
mi=new Integer(minute).intValue();
se=new Integer(second).intValue();