mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue