2
0
Fork 0
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:
Erik C. Thauvin 2024-08-05 10:25:41 -07:00
parent d42d2d6fa0
commit d72e6ebc2e
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}