code: private static boolean datetimeFormatSpecifiesZone(Slice formatString)
      {
          boolean quoted = false;
          for (char c : formatString.toStringUtf8().toCharArray()) {
              if (quoted) {
                  if (c == '\'') {
                      quoted = false;
                  }
                  continue;
              }
  
              switch (c) {
                  case 'z':
                  case 'Z':
                      return true;
                  case '\'':
                      // '' (two apostrophes) in a pattern denote single apostrophe and here we interpret this as "start quote" + "end quote".
                      // This has no impact on method's result value.
                      quoted = true;
                      break;
              }
          }
          return false;
      }
docs: Checks whether {@link DateTimeFormat} pattern contains time zone-related field.