Re: bug with date_convert_universal()

Richard Braakman <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
On Mon, Mar 11, 2002 at 08:10:52PM +0100, Angel Fradejas wrote:
> Sorry for misleading you. The code in date_convert_universal is correct now.
> It was corrected in version 1.9 as you can see in CVS. It assumes 1-12
> input, as you correctly pointed out. The problem is the comment in date.h.

Umm, no.  The month is in range 0-11, and has always been until date.c
got broken in revision 1.9.  date.h says 0-11 in the comment,
date_parse_http() generates a month from 0 to 11, and 
date_convert_universal() expects a month from 0 to 11.  Where did you
see an inconsistency?

Currently it doesn't work for a 1-12 month range either, because leap
year calculation is wrong.

I recommend reversing the patch from revision 1.9, and then taking a look
at smsc_emi2 which apparently fills in a wrong value for the month field.
(Does anyone have specs for the EMI date format?)

-- 
Richard Braakman
Will write free software for money.
See http://www.xs4all.nl/~dark/resume.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.