Hi Krunal.
This error comes when the time-coordinates have been fetched fine from NTP-server, but the system clock has not been synced.
So, kindly implement the function
/* * Syncs the system-clock. * * Returns SUCCESS on successful-syncing. * Else returns FAILURE. */ int sync_system_clock(DateParams *dateParams, unsigned long seconds) { return FAILURE; }
in device_time.c
DateParams structure is defined in commom/instamsg/driver/include/time.h
Using the fields therein, the RTC/Modem-Time/Time-source clock can be synced.
HI,
How it will get time when LAN is not connected or internet is not working?
Is there any function for that or no need to implement ??
Yes i am using RTC and it is having battery backup.
please tell me which function will get time from RTC ?
/* * This method returns the current-tick/timestamp. */ unsigned long getCurrentTick() { return 0; }
/* * This method gets the time in the following-format * * YYYYMMDD4HHMMSS * 201507304155546 */ void getTimeInDesiredFormat(char *buffer, int maxBufferLength) { }
/* * This method gets the timezone-offset for this device. */ void getTimezoneOffset(char *buffer, int maxBufferLength) { }
HI ,
I am using PCF2127AT RTC. in that there is no timezone sync or read or write option.
How can i get it in getTimezoneOffset() function?
Hi Krunal.
Since this is a RTC which is synced from NTP-Server (which ALWAYS returns time in UTC), so the offset in this case is 0.
So, simply strcpy "0" to the buffer.
Krunalkumar Darji
Dear Sir,
i am connecting my gateway through LAN port to Instamsg server.
i have implemenented the UDP stack for NTP time sync but i am getting this error as below:
[CLOCK-ERROR] Failed in last step to sync time with system-clock.
[CLOCK-ERROR] Failed to sync-time through NTP.