日期:2014-05-19  浏览次数:20661 次

日志日期格式化
readStart = line.indexOf("[") + 1;
readEnd = line.indexOf("]");
kjpAnalyticalLogVO.setAnlAccessTime(line.substring(readStart,readEnd));
通过上面的截取出来日期:17/Feb/2012:16:48:14 +0800这种怎么格式化


------解决方案--------------------
LZ 每设置local

Date d = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss Z",Locale.US).parse("17/Feb/2012:16:48:14 +0800");