Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-291

The dateTime functions parse the year to be from 1970 (as used by the time functions), that is to say year 0 = 1970. The XML spec says that year 0 does not exist or should represent 1BC (depending on revision)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Basic Architecture
    • None
    • n/a

    Description

      I'm still looking at a better solution for dateTime. Currently when decoding the dateTime field, the SoapDeSerializer::getElementAsDateTime() returns a struct tm. When encoding the dateTime field, the SoapSerializer::addOutputParam() method expects a struct tm structure to be passed to it. The tm struct is strongly associated with time functions that will interpret the year field differently from the definition used in the XML specification. For example, tm makes the assumption that year 0 is 1900 (see comment in WCHAR.H) while the time functions (defined in time.h) assume year 0 is 1970. The XML specification says year 0 does not exist (ISO8601) and the later, second edition says that year 0 is 1BC (pushing all minus years back one year)! Can we change the type used by time and date functions from the current structure type (and all its problems) to a more generic type that also caters for timezone offsets. My recommendation would be to create a new TimeDate class and to drop all of the required function into methods within this class.

      Following on from my earlier e-mail. To make date and time functions work correctly, will require a rewrite of AxisTime and the replacement of 'struct tm' with either another struct (not very C++) or a new time object.

      Attachments

        Activity

          People

            Unassigned Unassigned
            prestonf Fred Preston
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: