I recently began to work with a EMI2 smsc link, and have a question about the calculation of the timestamps for the MO messges.
 
First, the code at smsc_emi2.c splits day,month,year, and so on, and then it takes the corresponding time_t by calling date_convert_universal.
 
The question is the timestamp I'm getting in the msg->sms.time variable is one month ahead the real one. For example for the EMI2 timestamp "140102185129" I get a timestamp representing "14/02/2002 18:51:29 UTC".
 
I think the problem is in de date.c function date_convert_universal:
 
    line 81:  date += monthstart[t->month] * DAY;
 
Shouldn't it be
 
    line 81:  date += monthstart[t->month-1] * DAY;
 
?
 
Or am I doing something wrong?
 
I need exacts timestamps because we have to do accounting fo the sms traffic.
 
Angel Fradejas.
 

Reply via email to