gsm.h losing date and time for incoming sms

Hi. Need your help.

I have a code built on gsm.h controlling a relay with incoming sms. It works perfect, but for one thing. If for example the gsm shield is down or lost signal and I send 10sms to it during that time the relay will be initiated 10 times when the shield recives signal again.... This is a problem for me.

When I check the AT commands the AT+CMGL lists the date and time for the sms in output. But gsm.h does not... Somewhere in the code it flushes this away and I would need to keep it to be able to check the date and time and crossrefrence it and remove any sms older ten 2. That way the relay will not initiate becouse of any hickup at my provider.

I dont have the skill to dive into the libary code, anyone out there that could give me a hint?

Most GSM modules have an inbuilt clock which you can access using AT+CCLK. Some shields need a battery backup to keep time in the event of a power outage.

dannable: Most GSM modules have an inbuilt clock which you can access using AT+CCLK. Some shields need a battery backup to keep time in the event of a power outage.

Thank you. Will look into that. But I think that you missunderstood my queston.

I recive sms OK, but it only reads the sms and sender number. The gsm.h does not display the date and time for the recived sms.

This is the codepart of "retrive and read sms"

// If there are any SMSs available() if (sms.available()) { Serial.println("Message received from:");

// Get remote number sms.remoteNumber(senderNumber, 20); Serial.println(senderNumber);

// Read message bytes and print them while(c = sms.read()){ Serial.print(c); message += c; } // Delete message from modem memory sms.flush(); Serial.println("\nMESSAGE DELETED");

As you can see there is a command to read and print the senders number, and to read and print the sms. But the AT+CMGL command used to recive this also includes a date and time for when the text was recived and that is lost. GSM.h does not include a function "sms.date" so I guess my question is how can I write sutch afunction and include it in the gsm.h libery.