public static Temporal now(UICalendar uicalendar) {
        boolean timeOnly = uicalendar.isTimeOnly();
        ZoneId zone = calculateZoneId(uicalendar.getTimeZone());
        if (timeOnly) {
            return LocalTime.now(zone);
        }
        boolean hasTime = uicalendar.hasTime();
        return hasTime ? LocalDateTime.now(zone) : LocalDate.now(zone);
    }
Calculates NOW based on the calendar's current timezone or will default to system timezone if none set.
It will return a LocalDateTime if time units needed else just a LocalDate if no time is needed.

@param uicalendar the base calendar to calculate NOW for
@return a Temporal representing either a Date or DateTime
primefaces/src/main/java/org/primefaces/util/CalendarUtils.java