trouble with char variable when reading from SD and joining chars

I have text file have which have only one line exactly like this: “00004624127540018”
I try to read this file char by char and split this char to 3 variables tTime should have first 8 char from file, tTimeP should have 5 char (9 to 14 from file) and last 4 should be in count variable
tTime and count are OK but…
Why tTimeP have at the and and why have length = 6?

I also attached my sketch and file from SD
also here is pastebin with C++ highlighting http://pastebin.com/7i4fQ20v

#include <SD.h>
File myFile;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
//pinMode(15, OUTPUT);
  Serial.print("Initializing SD card...");


  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
  // re-open the file for reading:
  myFile = SD.open("wyciag.log");
  if (myFile) {
    Serial.println("wyciag.log");
 
    // read from the file until there's nothing else in it:
    char tTime[8];
    char tTimeP[5];
    char count[4];
    char tempC[30];
    int x = 0;
    int a = 0;
    int b = 0;
    int c = 0;
    while (myFile.available()) {
     
     char z = myFile.read();
    tempC[x] = z;
      if (x <8) {
        tTime[a] = z;
        a++;
      } else if ((x >7) && (x < 13)) {
        tTimeP[b] = z;
        b++;
      } else if (x>12) {
        count[c] = z;
        c++;
      }
      Serial.write(z);
      //Serial.write("|");
      x++;
    }
    Serial.println("");
    Serial.print("a = ");
    Serial.println(String(a));
    Serial.print("b = ");
    Serial.println(String(b));
    Serial.print("c = ");
    Serial.println(String(c));
    Serial.print("tTime len = ");
    Serial.println(strlen(tTime));
    Serial.print("tTimeP len = ");
    Serial.println(strlen(tTimeP));
    Serial.print("count len = ");
    Serial.println(strlen(count));
    Serial.print("tTime = ");
    Serial.println(tTime);
    Serial.print("tTimeP = ");
    Serial.println(tTimeP);
    Serial.print("count = ");
    Serial.println(count);
    Serial.print("tempC = ");
    Serial.println(tempC);
   
    // close the file:
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
 
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}
================================
Port Monitor output
Initializing SD card...initialization done.
wyciag.log
00004624127540018
a = 8
b = 5
c = 4
tTime len = 8
tTimeP len = 6
count len = 4
tTime = 00004624
tTimeP = 12754
count = 0018
tempC = 00004624127540018

sd_test.zip (1.07 KB)

I ask friend to test my sketch on his arduino and he have same problem, anyone can help?

You are using strlen on arrays that are not c strings. They do not have null termination.

You can make all the arrays one element longer and make the last one '\0'.

Alternatively, use sizeof for the length of the array.

I spent 5h+ trying resolve reading/writing to SD file and almost all the time I spent trying “remove” this square from end of tTimeP.
When I change srtlen to sizeof (like you say) then it show 5 for tTimeP how the hell explain this last (6-th) char/square whatever is it?
also what this “magic” sign ‘\0’ mean?

also what this “magic” sign ‘\0’ mean?

It is the null terminator for a c style string.
https://www.tutorialspoint.com/cprogramming/c_strings.htm

There are several useful functions, like strlen, which manipulate these c strings, and they expect the null terminator.

You need to do some google search on c++ String object, spelled with a capital S, and the c string, spelled with a small s.
https://www.tutorialspoint.com/cplusplus/cpp_strings.htm

Because of the limited memory in an Arduino, most of the advice you will get on this forum is to use null terminated character arrays (strings) and not the String Object (String).