RE: bug with date_convert_universal()
"Angel Fradejas" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Oded, 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. I said just the opposite that I wanted to say :-( Angel Fradejas. -----Mensaje original----- De: Oded Arbel [mailto:[email protected]] Enviado el: lunes 11 de marzo de 2002 20:07 Para: Angel Fradejas; Kannel-devel (E-mail) Asunto: RE: bug with date_convert_universal() Current CVS assumes that month is 1 - 12, while comments in date.h disgrees by suggesting 0 - 11 range - as quoted by you. This sounds like a problem to me, where one of these have to be fixed. -- Oded Arbel m-Wise Inc. [email protected] Every person has his price. Mine is $3.95. > -----Original Message----- > From: Angel Fradejas [mailto:[email protected]] > Sent: Monday, March 11, 2002 8:53 PM > To: Oded Arbel; Kannel-devel (E-mail) > Subject: RE: bug with date_convert_universal() > > > Hi Oded, > > Take a look at my posts about "timestamps with emi2" from > January 14h. This > was corrected because date_convert_universal precisely > assumed 1-12 input, > instead of the correct 0-11. > > Also, taken from date.h > > long month; /* 0-11 */ > > Hope this helps. > > Angel Fradejas. > > > -----Mensaje original----- > De: [email protected] > [mailto:[email protected]]En > nombre de Oded Arbel > Enviado el: lunes 11 de marzo de 2002 18:20 > Para: Kannel-devel (E-mail) > Asunto: bug with date_convert_universal() > > > Hi list. > > date_convert_universal() get a "universaltime" structure as > input, which > its month member is defined as having a range of 0 to 11, but > date_convert_universal assumes that it will get the month as > 1-12 - from > the code : > date += monthstart[t->month-1] * DAY; > > -- > Oded Arbel > m-Wise Inc. > [email protected] > > I do not fear Satan half so much as I fear those who fear him. > -- Theresa of Avila > >