When omitting the seconds, now 0 will be used for the seconds instead of *

This commit is contained in:
unknown 2015-07-03 16:03:23 +02:00
parent 9c51baacbd
commit e2077cfa4e
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<groupId>fc.cron</groupId>
<artifactId>cron</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
<version>1.3</version>
<name>cron</name>
<url>https://github.com/frode-carlsen/cron</url>

View File

@ -172,7 +172,7 @@ public class CronExpression {
}
int ix = withSeconds ? 1 : 0;
this.secondField = new SimpleField(CronFieldType.SECOND, withSeconds ? parts[0] : "*");
this.secondField = new SimpleField(CronFieldType.SECOND, withSeconds ? parts[0] : "0");
this.minuteField = new SimpleField(CronFieldType.MINUTE, parts[ix++]);
this.hourField = new SimpleField(CronFieldType.HOUR, parts[ix++]);
this.dayOfMonthField = new DayOfMonthField(parts[ix++]);