time stamp

Hello guys!!!
I’m using Mega 2560 for my little project and I try to read my bluetooth data from serial and send that to other device by getting request. I have problem about adding my time stamp. The receiving sync request string is like “ST,SYNC,Unix time "
here is part of my code:
char check = Serial2.read();
inString += check;
if(check == ‘\0’){
count_check = 0;
inString= “”;
digitalClockDisplay();
}
checkCommand[count_check] = check ;
count_check++;
for (int j = 0; j < sizeof(check_ST1); j++){
check_ST1[j] = checkCommand[j];
}
if(strcmp(check_ST1,ST1)==0){
allow = 1;
}
if(strcmp(check_SYNC,SYNC)==0 && allow == 1){
processSyncMessage();
allow = 0;
}
void digitalClockDisplay(){ // digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(”-");
Serial.print(day());
Serial.print("/");
Serial.print(month());
Serial.print("/");
Serial.print(year());
Serial.print(",");
}
void printDigits(int digits){
Serial.print(":");
if(digits < 10)
Serial.print(‘0’);
Serial.print(digits);
}
void processSyncMessage() {
char check = Serial.read() ;
time_t pctime = 0;
for(int i=0; i < TIME_MSG_LEN -1; i++){
check = Serial.read();
if( isDigit(check)) {
pctime = (10 * pctime) + (check - ‘0’) ; // convert digits to a number
}
}
setTime(pctime); // Sync clock to the time received on serial port
}
/

your help be appreciate !!

yes but what is the problem you are having ?

if(check == '\0'){

What is sending the data? No app that I know of actually sends a NULL.