public static function convertTimezone(
        $date,
        string $toTimezone,
        string $fromTimezone = "UTC",
        bool $immutable = false
    ): \DateTimeInterface
    {
        if ($date instanceof \DateTimeInterface) {
            $date = $date->format(self::FORMAT);
        } elseif (!is_string($date)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'date'; expecting an instance of ".
                "DateTimeInterface or a date as string"
            );
        }

        $from = new \DateTimeZone($fromTimezone);
        $to = new \DateTimeZone($toTimezone);

        $ret = ($immutable)
            ? new \DateTimeImmutable($date, $from)
            : new \DateTime($date, $from);

        return $ret->setTimezone($to);
    }