Skip to content

Commit

Permalink
P4ADEV-1450 fix date format
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoGiuliani committed Dec 4, 2024
1 parent 376aa3e commit 8cc3fde
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import it.gov.pagopa.payhub.anpr.C003.model.generated.*;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -47,12 +50,13 @@ private List<TipoInfoSoggettoEnte> generateInfoSubject() {
}

private TipoInfoSoggettoEnte createTipoInfoSoggettoEnte(String key, String value, String description) {
String formattedDate = LocalDate.ofInstant(faker.date().birthday().toInstant(), ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
return new TipoInfoSoggettoEnte(
key,
value,
TipoInfoValore.S,
description,
faker.date().birthday().toString(),
formattedDate,
""
);
}
Expand Down

0 comments on commit 8cc3fde

Please sign in to comment.