Skip to content

Commit

Permalink
Update the pattern to match . in the data string for truncating secon…
Browse files Browse the repository at this point in the history
…ds part.
  • Loading branch information
ravikirankatneni committed Feb 8, 2019
1 parent e9084c5 commit 61536b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class DateFormatISO8601
{

private static Pattern T_PATTERN = Pattern.compile( "T" );
private static Pattern TIME_PART_PATTERN = Pattern.compile( "\\d\\d:\\d\\d:\\d\\d.\\d+" );
//Time pattern matches the time part similar to 02:15:01.999620
private static Pattern TIME_PART_PATTERN = Pattern.compile( "\\d\\d:\\d\\d:\\d\\d\\.\\d+" );

/**
* Parse a date/time string.
Expand All @@ -55,6 +56,7 @@ public static Date parse( String source, TimeZone timeZone ) throws BirtExceptio
}
if ( dateFormat != null )
{
source = cleanDate( source );
resultDate = dateFormat.parse( source );
}
return resultDate;
Expand Down

0 comments on commit 61536b2

Please sign in to comment.