|
Try this script included in AT Command Tester Tool.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Script-at_cclk.at
//Test AT+CCLK AT command
//AT+CCLK Set/Get date and time
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//List of supported write values for AT+CCLK
AT+CCLK=?
//WAIT for 1 sec
WAIT=1
//Get the current date time
//If there is any error, CME error code is returned
AT+CCLK?
//WAIT for 1 sec
WAIT=1
//Set date and time
//Format is "yy/MM/dd,hh:mm:ss±zz", where characters indicate year (two last digits),month, day, hour, minutes, seconds and time zone
//time zone indicates the difference, expressed in quarters of an hour, between the local time and GMT; range -47...+48).
//For example to set date/time for 3rd March 2018 9 PM PST
AT+CCLK="18/03/03,21:00:00-32"
//WAIT for 1 sec
WAIT=1
//Get the current date time
//If there is any error, CME error code is returned
AT+CCLK?
//WAIT for 1 sec
WAIT=1
//Set date and time
//Format is "yy/MM/dd,hh:mm:ss±zz", where characters indicate year (two last digits),month, day, hour, minutes, seconds and time zone
//time zone indicates the difference, expressed in quarters of an hour, between the local time and GMT; range -47...+48).
//For example to set date/time for 3rd March 2018 5 AM EST
AT+CCLK="18/03/03,05:00:00-16"
//WAIT for 1 sec
WAIT=1
//Get the current date time
//If there is any error, CME error code is returned
AT+CCLK?
//WAIT for 1 sec
WAIT=1
Output of above script in AT Command Tester Tool.
AT+CCLK=?
OK
AT+CCLK?
+CCLK: "18/03/03,05:02:41-20"
OK
Current time is"18/03/03,05:02:41-20"
AT+CCLK="18/03/03,21:00:00-32"
OK
AT+CCLK?
+CCLK: "18/03/03,21:00:02-32"
OK
Current time is"18/03/03,21:00:02-32"
AT+CCLK="18/03/03,05:00:00-16"
OK
AT+CCLK?
+CCLK: "18/03/03,05:00:02-16"
OK
Current time is"18/03/03,05:00:02-16"