提交 c1246ed6 编写于 作者: K kohsuke

some versions of CVS includes timezone in cvs log, so modified to parse them....

some versions of CVS includes timezone in cvs log, so modified to parse them. See http://ximbiot.com/cvs/wiki/index.php?title=CVS_FAQ#Date_not_available_when_in_Eclipse_3.0.1_when_comparing_with_revision


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1386 71c3de6d-444a-0410-be80-ed276b4c234a
上级 0d1c5344
......@@ -54,6 +54,8 @@ class ChangeLogParser {
*/
private static final SimpleDateFormat[] c_inputDate
= new SimpleDateFormat[]{
new SimpleDateFormat("yyyy/MM/dd HH:mm:ss Z"),
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"),
new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"),
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"),
};
......@@ -238,8 +240,9 @@ class ChangeLogParser {
*/
private void processDate(final String line) {
if (line.startsWith("date:")) {
m_date = line.substring(6, 25);
String lineData = line.substring(line.indexOf(";") + 1);
int idx = line.indexOf(";");
m_date = line.substring(6, idx);
String lineData = line.substring(idx + 1);
m_author = lineData.substring(10, lineData.indexOf(";"));
m_status = GET_COMMENT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册