protected function _setExpiry($expiry)
    {
        if (is_object($expiry) && in_array(get_class($expiry), [Date::class, FrozenDate::class, FrozenTime::class, Time::class])) {
            return $expiry;
        }

        return new Time($expiry);
    }