Time t = new Time();//实例化Time类
t.setToNow();//取得当前的系统时间 int month = t.month;//获取月 int year = t.year;//获取年 int minute = t.minute;//获取分钟 int date = t.monthDay;//获取日 int hour = t.hour;//获取时