You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Fred Preston (JIRA)" <ax...@ws.apache.org> on 2005/09/28 13:12:47 UTC
[jira] Created: (AXISCPP-840) The class xsd__dateTime needs methods to get/set date and time.
The class xsd__dateTime needs methods to get/set date and time.
---------------------------------------------------------------
Key: AXISCPP-840
URL: http://issues.apache.org/jira/browse/AXISCPP-840
Project: Axis-C++
Type: Improvement
Components: Client - API
Environment: n/a
Reporter: Fred Preston
The class xsd__dateTime needs methods to get/set date and time. Currently if the user wants to set the date and time they have to remember that they are populating a tm stuct structure and that years are offset from 1900 and months will have 1 added to them. Thus, if you populate the dateTime as follows:- (28 Sept 2005 @ 12:12:12)
pWS->Calendar = new xsd__dateTime();
pWS->Calendar->tm_mday = 28;
pWS->Calendar->tm_wday = 28;
pWS->Calendar->tm_yday = 28;
pWS->Calendar->tm_mon = 9;
pWS->Calendar->tm_year = 2005;
pWS->Calendar->tm_hour = 12;
pWS->Calendar->tm_min = 12;
pWS->Calendar->tm_sec = 12;
This will appear on the wire as:- (notice the date and month)
<Calendar>3905-10-28T12:12:12Z</Calendar>
If we had a couple of get/set methods for date and time, that convert an absolute date (i.e. 2005) to a tm stuct date (i.e. one that is offset from 1900) and an absolute month (i.e. 1=Jan, 2=Feb, etc) to a tm struct month (i.e. 0=Jan, 1=Feb, etc) and vise versa, this might remove the confusion. For example:-
pWS->Calendar.setDate( 28, 9, 2005)
would be interpretted as:
pWS->Calendar->tm_mday = 28;
pWS->Calendar->tm_wday = 28;
pWS->Calendar->tm_yday = 28;
pWS->Calendar->tm_mon = 8;
pWS->Calendar->tm_year = 105;
And
string date = pWS->Calendar.getDate()
would return 28,9,2005 (or some other delimited string).
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-840) The class xsd__dateTime needs methods to get/set date and time.
Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-840?page=comments#action_12331156 ]
John Hawkins commented on AXISCPP-840:
--------------------------------------
As a short-term meeasure we can just comment tthat we they are using tm_struct into the generated type?
> The class xsd__dateTime needs methods to get/set date and time.
> ---------------------------------------------------------------
>
> Key: AXISCPP-840
> URL: http://issues.apache.org/jira/browse/AXISCPP-840
> Project: Axis-C++
> Type: Improvement
> Components: Client - API
> Environment: n/a
> Reporter: Fred Preston
>
> The class xsd__dateTime needs methods to get/set date and time. Currently if the user wants to set the date and time they have to remember that they are populating a tm stuct structure and that years are offset from 1900 and months will have 1 added to them. Thus, if you populate the dateTime as follows:- (28 Sept 2005 @ 12:12:12)
> pWS->Calendar = new xsd__dateTime();
> pWS->Calendar->tm_mday = 28;
> pWS->Calendar->tm_wday = 28;
> pWS->Calendar->tm_yday = 28;
> pWS->Calendar->tm_mon = 9;
> pWS->Calendar->tm_year = 2005;
> pWS->Calendar->tm_hour = 12;
> pWS->Calendar->tm_min = 12;
> pWS->Calendar->tm_sec = 12;
> This will appear on the wire as:- (notice the date and month)
> <Calendar>3905-10-28T12:12:12Z</Calendar>
> If we had a couple of get/set methods for date and time, that convert an absolute date (i.e. 2005) to a tm stuct date (i.e. one that is offset from 1900) and an absolute month (i.e. 1=Jan, 2=Feb, etc) to a tm struct month (i.e. 0=Jan, 1=Feb, etc) and vise versa, this might remove the confusion. For example:-
> pWS->Calendar.setDate( 28, 9, 2005)
> would be interpretted as:
> pWS->Calendar->tm_mday = 28;
> pWS->Calendar->tm_wday = 28;
> pWS->Calendar->tm_yday = 28;
> pWS->Calendar->tm_mon = 8;
> pWS->Calendar->tm_year = 105;
> And
> string date = pWS->Calendar.getDate()
> would return 28,9,2005 (or some other delimited string).
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira