GPRS/GSM Shield Time Setting Problems

PaulS:
Why you are repeatedly sending a command to set the time is a mystery. That should be done ONCE, in setup().

Thanks for your tips, I will do as you said, setting the time at the setup(). and this program will only be done one time before I upload my project code. And GPRS/GSM Shield will be on power all time to keep its RTC run.

The response is supposed to end with some kind of value that says "this is the end of the reply". You need to wait, in a while loop, for that character to arrive BEFORE you send another command.

I changed the wait time to 2000(2s),and it works well . but the result also have a little problem.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8); // RX, TX
void setup()  
{
 // Open serial communications and wait for port to open:
  Serial.begin(19200);
  // set the data rate for the SoftwareSerial port
  mySerial.begin(19200);
}

void loop() // run over and over
{
mySerial.println( "AT+CCLK =\"12/12/27,10:43:50+08\"");
   delay(500);
  if (mySerial.available())
    Serial.write(mySerial.read());
   delay(500);
mySerial.println( "AT+CCLK?" );
    delay(500);
    if (mySerial.available())
    Serial.write(mySerial.read());
   delay(500);
}

The result shows

AT+CCLK ="12/12/27,10:43:50+08"
OK
AT+CCLK?
+CCLK: "12/12/27,10:43:50+08"
OK
AT+CCLK ="12/12/27,10:43:50+08"
OK
AT+AAAAAAAAAAAAAAAAA

There also are many A .Can you tell me why does this happen?
thanks