How about this alternative implementation?:

    def fromIsoDateTimeString(string: String): Option[DateTime] = {
      def c(ix: Int) = string.charAt(ix)
      def isDigit(c: Char) = '0' <= c && c <= '9'
      def isDigitOrZ(c: Char) = isDigit(c) || c == 'Z'
      def i(ix: Int) = {
        val x = c(ix)
        require(isDigit(x))
        x - '0'
      }
      def check(len: Int): Boolean =
        len match {
          case 19 ⇒ c(4) == '-' && c(7) == '-' && c(10) == 'T' && c(13) == ':' && c(16) == ':'
          case 21 ⇒ check(19) && c(19) == '.' && isDigit(c(20))
          case 22 ⇒ check(21) && isDigitOrZ(c(21))
          case 23 ⇒ check(21) && isDigit(c(21)) && isDigitOrZ(c(22))
          case 24 ⇒ check(21) && isDigit(c(21)) && isDigit(c(22)) && c(23) == 'Z'
          case _  ⇒ false
        }
      if (check(string.length)) {
        try {
          val year = i(0) * 1000 + i(1) * 100 + i(2) * 10 + i(3)
          val month = i(5) * 10 + i(6)
          val day = i(8) * 10 + i(9)
          val hour = i(11) * 10 + i(12)
          val min = i(14) * 10 + i(15)
          val sec = i(17) * 10 + i(18)
          Some(DateTime(year, month, day, hour, min, sec))
        } catch { case _: IllegalArgumentException ⇒ None }
      } else None
    }