axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Dick (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Commented: (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)
Date Fri, 04 Feb 2005 17:45:25 GMT
     [ http://issues.apache.org/jira/browse/AXISCPP-291?page=comments#action_58606 ]
     
Adrian Dick commented on AXISCPP-291:
-------------------------------------

The SOAP Serializers and Deserializers for the Date/Time simple types correctly represent
the data across the wire, using struct tm objects which follow the ANSI C specification that
0 be used to represent 1900.

However, the various time functions using 0 to represent 1970 prevent the serialization of
any dates prior to 1970.
Currently, this situation is not handled neatly, we should detect this and return an appropriate
Exception.
Longer term we will need to find a more suitable solution, as suggested by Fred.

> 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)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-291
>          URL: http://issues.apache.org/jira/browse/AXISCPP-291
>      Project: Axis-C++
>         Type: Bug
>   Components: Basic Architecture
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Adrian Dick

>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message