Menu

Date typed fields

Help
2003-05-07
2003-05-19
  • Mark Cooper

    Mark Cooper - 2003-05-07

    I think that you are returning back the wrong date...though I could be wrong.

    in timeFromXml() I added this:
         t.tm_year -= 1900;
    to line 391

    and in timeToXml() i change this:
    t->tm_year,
    to
    t->tm_year + 1900,

    I think this correct according too the spec. When I don't do that my php pages crash!

     
    • Chris Morley

      Chris Morley - 2003-05-08

      Hmmm, I will look into it. There was a problem in that the code that writes out the dates was not ensuring that the year field was padded out to four digits - that may be the problem you are seeing.
      The fix is in cvs in XmlRpcValue.cpp if you want to try it.

       
    • Chris Morley

      Chris Morley - 2003-05-13

      I think that the code is working as intended here.
      The value in the struct tm field tm_year seems to be consistent with what is in the XML. Let me know if you still have problems after getting the fix I mentioned above.

      Chris

       
    • Mark Cooper

      Mark Cooper - 2003-05-16

      Er, PHP/Apache still crashes horribly with that fix. I think you want to increment the tm.year field by 1900. Looking at all the other xml-rpc examples, it seems like years get returned as 2003, rather then 0103 (how you are returning it now). I think this won't break anyone else code (hopefully).

      If not, no big deal...

       
      • Chris Morley

        Chris Morley - 2003-05-19

        Yes, you are right, I completely misunderstood the problem. I will fix it as you indicated.

         

Log in to post a comment.