Seems the example of NTP service "get_time" have problems with time zones with negative numbers, I expend a whole day trying to find a reason why in my timezone (GMT -3) the date shows wrong, but working very well for others, and I found that the variable type that comes as argument of the function GetSNTPTime is unsigned char and the result subtraction of seconds in the code gives a wrong number.
So, I suggest to change this:
static long GetSNTPTime(unsigned char ucGmtDiffHr, unsigned char ucGmtDiffMins);
to some signed type like this (which I'm using):
long GetSNTPTime(long ucGmtDiffHr, long ucGmtDiffMins);
to fix the problem as it works very well.
Regards,
JP