Browse Source

Fix up date parsing to pick up time aswell

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272204 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
ba6d89f244
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogParser.java
  2. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java

+ 2
- 2
proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogParser.java View File

@@ -37,7 +37,7 @@ class ChangeLogParser
private static final int GET_PREVIOUS_REV = 5;

/** input format for dates read in from cvs log */
private static final SimpleDateFormat c_inputDate = new SimpleDateFormat( "yyyy/MM/dd" );
private static final SimpleDateFormat c_inputDate = new SimpleDateFormat( "yyyy/MM/dd hh:mm:ss" );

//The following is data used while processing stdout of CVS command
private String m_file;
@@ -189,7 +189,7 @@ class ChangeLogParser
{
if( line.startsWith( "date:" ) )
{
m_date = line.substring( 6, 16 );
m_date = line.substring( 6, 25 );
String lineData = line.substring( line.indexOf( ";" ) + 1 );
m_author = lineData.substring( 10, lineData.indexOf( ";" ) );



+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java View File

@@ -76,7 +76,7 @@ class ChangeLogParser
private static final int GET_PREVIOUS_REV = 5;

/** input format for dates read in from cvs log */
private static final SimpleDateFormat c_inputDate = new SimpleDateFormat( "yyyy/MM/dd" );
private static final SimpleDateFormat c_inputDate = new SimpleDateFormat( "yyyy/MM/dd hh:mm:ss" );

//The following is data used while processing stdout of CVS command
private String m_file;
@@ -220,7 +220,7 @@ class ChangeLogParser
{
if( line.startsWith( "date:" ) )
{
m_date = line.substring( 6, 16 );
m_date = line.substring( 6, 25 );
String lineData = line.substring( line.indexOf( ";" ) + 1 );
m_author = lineData.substring( 10, lineData.indexOf( ";" ) );



Loading…
Cancel
Save