char timeBuffer[9];
timeBuffer[9] = '\0';
Creating an array to hold 9 elements, then setting the 10th one, to any value, is not a good idea.
char timeBuffer[9];
timeBuffer[9] = '\0';
Creating an array to hold 9 elements, then setting the 10th one, to any value, is not a good idea.