Clarify that schedule config's startTime hour must be zero-padded
Configuring a startTime as "6:00" is incorrect; it should be "06:00". Clarify this in the documentation and fix the Javadoc that shows an incorrect value. Also add a test. Change-Id: I8e72d42088163b6659204913e8b0685bd957c3d8
This commit is contained in:
parent
d7a91bc30e
commit
18f388accc
@ -5064,7 +5064,7 @@ The placeholders can have the following values:
|
||||
|
||||
+
|
||||
The time zone cannot be specified but is always the system default
|
||||
time zone.
|
||||
time zone. Hours must be zero-padded, i.e. `06:00` rather than `6:00`.
|
||||
|
||||
The section (and optionally the subsection) in which the `interval` and
|
||||
`startTime` keys must be set depends on the background job for which a
|
||||
|
@ -91,7 +91,7 @@ import org.eclipse.jgit.lib.Config;
|
||||
* executions are {@code Wed 10:30}, {@code Fri 10:30}. etc.
|
||||
* <li>
|
||||
* <pre>
|
||||
* foo.startTime = 6:00
|
||||
* foo.startTime = 06:00
|
||||
* foo.interval = 1 day
|
||||
* </pre>
|
||||
* Assuming that the server is started on {@code Mon 7:00} then this yields the first run on
|
||||
|
@ -202,6 +202,9 @@ public class ScheduleConfigTest {
|
||||
|
||||
rc.setString("a", null, ScheduleConfig.KEY_STARTTIME, "0100");
|
||||
assertThat(ScheduleConfig.builder(rc, "a").buildSchedule()).isEmpty();
|
||||
|
||||
rc.setString("a", null, ScheduleConfig.KEY_STARTTIME, "1:00");
|
||||
assertThat(ScheduleConfig.builder(rc, "a").buildSchedule()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user