Fix issue with time parsing

This commit is contained in:
George Kalampokis 2021-12-08 16:42:16 +02:00
parent 0a39e64f9a
commit 17b72cde60
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ public class WordBuilder {
try {
instant = Instant.parse((String) field.getValue());
} catch (DateTimeParseException ex) {
instant = (Instant) DateTimeFormatter.ofPattern("yyyy-MM-dd").parse((String)field.getValue());
instant = Instant.from(DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).parse((String)field.getValue()));
}
return field.getValue() != null ? DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(instant) : "";
}