Skip to content

Commit

Permalink
Europe/Rome timezone for createdAt in emails, minor fixes (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndc-dxc authored Jul 11, 2024
1 parent 6d5535b commit 39a8003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ private String getEvents(List<EventDto> eventDtos) {

private String toLocalDate(Instant createdAt) {
return DateTimeFormatter.ofPattern("dd MMMM yyyy HH:mm:ss")
.withZone(ZoneId.systemDefault())
.withZone(ZoneId.of("Europe/Rome"))
.format(createdAt);
}

private String toSubList(Map<String, Object> context) {
return "<ul>"
+ context.entrySet().stream()
.map(entry -> "<li><b>" + entry.getKey() + ":</b>" + entry.getValue() + "</li>")
.map(entry -> "<li><b>" + entry.getKey() + ":</b> " + entry.getValue() + "</li>")
.collect(Collectors.joining())
+ "</ul>";
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/alerter_mail_template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>Ciao <b>${recipient.name} ${recipient.surname}</b></p>
<p>Ciao ${recipient.name} ${recipient.surname}</p>
<p>Di seguito i dettagli degli eventi riscontrati:</p>
${eventList}
<p>Origine: Generata automaticamente dall'harvester.</p>
Expand Down

0 comments on commit 39a8003

Please sign in to comment.