protected function formatDatetime(DateTimeInterface $date, PropDefinition $definition): string
    {
        $timezone = $definition->get('timezone', $this->getDefaultTimezone());
        if ($timezone !== null) {
            $date = $this->convertTimeZone($date, $timezone);
        }

        return $date->format($definition->get('format', $this->getDatetimeFormat()));
    }