mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 00:07:12 -07:00
Truncate jmod ISO date to seconds
This commit is contained in:
parent
d42d2d6fa0
commit
d72e6ebc2e
2 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@ package rife.bld.operations;
|
|||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -74,7 +75,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions date(ZonedDateTime date) {
|
||||
put("--date", date.format(DateTimeFormatter.ISO_INSTANT));
|
||||
put("--date", date.truncatedTo(ChronoUnit.SECONDS).format(DateTimeFormatter.ISO_INSTANT));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class TestJmodOperation {
|
|||
.classpath(args.get("--class-path"))
|
||||
.cmds(args.get("--cmds"))
|
||||
.config(args.get("--config"))
|
||||
.date(ZonedDateTime.of(1997, 8, 29, 2, 14, 0, 0, ZoneId.of("America/Los_Angeles")))
|
||||
.date(ZonedDateTime.of(1997, 8, 29, 2, 14, 0, 1, ZoneId.of("America/Los_Angeles")))
|
||||
.dir(args.get("--dir"))
|
||||
.doNotResolveByDefault(true)
|
||||
.dryRun(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue