protected function convertTimeZone(DateTimeInterface $date, $timezone)
    {
        $timezone = ($timezone instanceof DateTimeZone) ? $timezone : new DateTimeZone($timezone);

        if ($date->getTimezone() !== $timezone) {
            if ($date instanceof DateTime) {
                // DateTime is not immutable, so make a copy
                $date = (clone $date);
                $date->setTimezone($timezone);
            } elseif ($date instanceof DateTimeImmutable) {
                $date = $date->setTimezone($timezone);
            }
        }

        return $date;
    }