>Hi List,
>the following code from at2 looks suspiciously out of date:
>
>         /* get the timestamp */
>         mtime.year   = octstr_get_char(pdu, pos) + 1900; pos++;
>         mtime.month  = octstr_get_char(pdu, pos); pos++;
>         mtime.day    = octstr_get_char(pdu, pos); pos++;
>         mtime.hour   = octstr_get_char(pdu, pos); pos++;
>         mtime.minute = octstr_get_char(pdu, pos); pos++;
>         mtime.second = octstr_get_char(pdu, pos); pos++;
>
>Currently this assigns mtime.year the value 1901. This seems
>wrong to me.
>

No, this code is absolutely correct. check out the manpage of the 
corresponding function. It returns years since 1900 so today it will 
return 101 not a two digit year.

-- 

Andreas Fink
Fink-Consulting

------------------------------------------------------------------
Tel: +41-61-6932730 Fax: +41-61-6932729  Mobile: +41-79-2457333
Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]  Homepage: http://www.finkconsulting.com
------------------------------------------------------------------
Something urgent? Try http://www.smsrelay.com/  Nickname afink

Reply via email to