public static function getPHPFormat(EntityInterface $field)
    {
        $settings = $field->metadata->settings;
        $format = empty($settings['format']) ? 'yy-mm-dd' : $settings['format'];
        if ($settings['timepicker']) {
            $format .= ' ';
            if (empty($settings['time_format'])) {
                $format .= 'H:mm';
                $format .= empty($settings['time_seconds']) ?: ':ss';
            } else {
                $format .= $settings['time_format'];
            }
        }

        return static::normalizeFormat($format);
    }