Save Strings

Hello I need some help.

I have a Arduino Ethernet and an Arduino Gsm shield, the official one.

I have this code, and I can’t understand why it stop saving the Strings after “est_time”?
can you help me?

Thank you

////////////////////////////////////////////////////////////////////////////////
///////////////////// Library and initializations //////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#include <GSM.h>

GSM gsmAccess;
GSMVoiceCall vcs;
GSM_SMS sms;

GSM3ShieldV1DirectModemProvider modemAccess;

char charbuffer[20];

////////////////////////////////////////////////////////////////////////////////
///////////////PIN Number of the SIM card, phone numbers and SMS////////////////
////////////////////////////////////////////////////////////////////////////////

#define PINNUMBER ""

String Nr1 = "+31635118***";  
const char* Nr2 = "+31635118***"; 
const char* Nr3 = "+31635130***";

String txtMsg = "Hello from Arduino GSM Shield.";

String utc_time=0;
String start_time=0;
String est_time=0;
String last_time=0;
String sms_time=0;
String controltest=0;
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

void setup()
{
  Serial.begin(9600);
  Serial.println("Network TEST");
  Serial.println("Waiting for the GSM Shield...");
 
  boolean notConnected = true;
    while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER)==GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }
  
  Serial.println("GSM Shield initialized");
  Serial.println("---------------------------------------------------"); 
  
  Serial.print("UTC Time: ");
    /*
    modemAccess.writeModemCommand("AT+CCLK?",1500);
    modemAccess.writeModemCommand("AT+QNTP=\"0.nl.pool.ntp.org\"",123);  
    modemAccess.writeModemCommand("AT+QNTP?",1500);
    modemAccess.writeModemCommand("AT+QNTP",1500);
    */ 
    utc_time= String (modemAccess.writeModemCommand(("AT+CCLK?"),1500));
    Serial.println(utc_time);
   
  Serial.println("---------------------------------------------------"); 
   
    Serial.print("1. Call From +31635118*** to ");
    Serial.println(Nr1);
  
    Serial.print("Calling to : ");
    Serial.println(Nr1);
        
    //Call the remote number
    Nr1.toCharArray(charbuffer, 20);
    Serial.print("Start time: ");
    start_time= String (modemAccess.writeModemCommand(("AT+CCLK?"),1500));
    Serial.println(start_time);
    
    // Checkde if the receiving end has picked up the call
    
        if(vcs.voiceCall(charbuffer))
        {
          Serial.println("Call Established at: ");
          est_time=modemAccess.writeModemCommand(("AT+CCLK?"),1500);
          Serial.println(est_time);
          Serial.println("Hang up in 30s");
          
          delay(30000);          
          
          // And hang up
          vcs.hangCall();
          Serial.println("Stop time: ");
          
          //Serial.println(modemAccess.writeModemCommand(("AT+CCLK?"),1500));
          last_time= String (modemAccess.writeModemCommand(("AT+CCLK?"),1500));
          Serial.println(last_time);
        }


      Serial.println("---------------------------------------------------"); 
      Serial.println("2. SMS From +31635118*** to +31635118***");
      Serial.print("SMS: Hello from Arduino GSM Shield.");
          
       // send the message    
       
        sms.beginSMS(Nr2);
        sms.print(txtMsg);
        sms.endSMS(); 
        Serial.println("\nSMS sent at: \n");
        sms_time=modemAccess.writeModemCommand(("AT+CCLK?"),1500);
        Serial.println(sms_time);



      Serial.println("---------------------------------------------------"); 
      Serial.println("3. Control SMS From +31635118*** to +31635130***");

        
        controltest= utc_time; //+ start_time;
          
        // send the message    
        sms.beginSMS(Nr3);
        sms.print(controltest);
        sms.endSMS(); 
        Serial.println(controltest);
        Serial.println("End of the Test");

}


void loop()
{        
     
}

Placido:
why it stop saving the Strings

What does that even mean? You have to describe your problem much better than an ambiguous word like "save"

Ok, let me try to explain better.

utc_time= String (modemAccess.writeModemCommand(("AT+CCLK?"),1500));
    Serial.println(utc_time);

In this lines, I save the current time in the string "utx_time" and after I print it on the serial monitor.

at this line I do the same:

last_time= String (modemAccess.writeModemCommand(("AT+CCLK?"),1500));
          Serial.println(last_time);

And here he does not save it. Why?