public static function filter($value, bool $allowNull = false)
    {
        if (self::valueIsNullAndValid($allowNull, $value)) {
            return null;
        }

        if ($value instanceof \DateTimeZone) {
            return $value;
        }

        if (!is_string($value) || trim($value) == '') {
            throw new FilterException('$value not a non-empty string');
        }

        try {
            return new \DateTimeZone($value);
        } catch (\Exception $e) {
            throw new FilterException($e->getMessage(), $e->getCode(), $e);
        }
    }