Add conversion of instant to localDate

This commit is contained in:
2022-09-28 08:22:51 -05:00
parent 89c9c72772
commit 70ded4c887

View File

@ -232,6 +232,10 @@ public class ValueUtils
ZoneId zid = (tz == null) ? ZoneId.systemDefault() : tz.toZoneId();
return LocalDateTime.ofInstant(c.toInstant(), zid).toLocalDate();
}
else if(value instanceof Instant i)
{
return LocalDate.ofInstant(i, ZoneId.systemDefault()); // todo - where should the zone come from?
}
else if(value instanceof LocalDateTime ldt)
{
return ldt.toLocalDate();