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 "Senaka Fernando (JIRA)" <ji...@apache.org> on 2008/02/27 12:51:51 UTC
[jira] Created: (AXIS2C-1013) Error in month in date_time
Error in month in date_time
---------------------------
Key: AXIS2C-1013
URL: https://issues.apache.org/jira/browse/AXIS2C-1013
Project: Axis2-C
Issue Type: Bug
Components: util
Affects Versions: 1.3.0
Reporter: Senaka Fernando
Assignee: Senaka Fernando
Error in month in date_time. gmtime returns month as 0 rather than 1 for January. This creates problems.
Regards,
Senaka
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: [jira] Created: (AXIS2C-1013) Error in month in date_time
Posted by Senaka Fernando <se...@wso2.com>.
Hi Kaushalye,
OK, we'll have this fixed after the release. +1 for reverting.
Regards,
Senaka.
> Senaka Fernando wrote:
>> A late fix in axutil_date_time, has created an issue in handling the
>> month
>> of the day due to gmtime treating January as zero. The fix has been
>> applied partially leaving a bug when we call the function
>> axutil_date_time_create_with_offset(). We won't be fixing this for 1.3.0
>> as the release is so near and will do it as soon as the release is done.
>>
> -1.
> This is a critical issue. We need to fix it before 1.3.0. Otherwise
> Apache Rampart/C would not be inter-operable with other implementations.
> -Kau
>> This may cause issues with Timestamp generations especially in Rampart/C
>> and if you are working from the head, until the release is done. If
>> there
>> are anyone else who are experiencing similar problems, we would like to
>> know about that too.
>>
>> The intention of the fix is to treat January as 1 instead of 0. Thus if
>> I
>> set the date as axutil_date_time_set_date_time(date_time, env, 2008, 1,
>> 1,
>> 12, 0, 0, 0), he should see it print as 2008-01-01T12:00:00.000Z rather
>> than 2008-02-01T12:00:00.000Z. Also the serialize must be compatible
>> with
>> the deserialize, due to the same reason that we must not see month =
>> month
>> + 1.
>>
>> I fixed this bug but left out a required modification in
>> axutil_date_time_create_with_offset() by mistake. Attached herewith is a
>> diff to solve the issue.
>>
>> Regards,
>> Senaka
>>
>>
>>> Error in month in date_time
>>> ---------------------------
>>>
>>> Key: AXIS2C-1013
>>> URL: https://issues.apache.org/jira/browse/AXIS2C-1013
>>> Project: Axis2-C
>>> Issue Type: Bug
>>> Components: util
>>> Affects Versions: 1.3.0
>>> Reporter: Senaka Fernando
>>> Assignee: Senaka Fernando
>>>
>>>
>>> Error in month in date_time. gmtime returns month as 0 rather than 1
>>> for
>>> January. This creates problems.
>>>
>>> Regards,
>>> Senaka
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> You can reply to this email to add a comment to the issue online.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> Index: util/src/date_time.c
>>> ===================================================================
>>> --- util/src/date_time.c (revision 631504)
>>> +++ util/src/date_time.c (working copy)
>>> @@ -61,7 +61,7 @@
>>> utc_time = gmtime(&t);
>>>
>>> date_time->year = utc_time->tm_year;
>>> - date_time->mon = utc_time->tm_mon;
>>> + date_time->mon = utc_time->tm_mon + 1;
>>> date_time->day = utc_time->tm_mday;
>>> date_time->hour = utc_time->tm_hour;
>>> date_time->min = utc_time->tm_min;
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
> --
> http://blog.kaushalye.org/
> http://wso2.org/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: [jira] Created: (AXIS2C-1013) Error in month in date_time
Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Senaka Fernando wrote:
> A late fix in axutil_date_time, has created an issue in handling the month
> of the day due to gmtime treating January as zero. The fix has been
> applied partially leaving a bug when we call the function
> axutil_date_time_create_with_offset(). We won't be fixing this for 1.3.0
> as the release is so near and will do it as soon as the release is done.
>
-1.
This is a critical issue. We need to fix it before 1.3.0. Otherwise
Apache Rampart/C would not be inter-operable with other implementations.
-Kau
> This may cause issues with Timestamp generations especially in Rampart/C
> and if you are working from the head, until the release is done. If there
> are anyone else who are experiencing similar problems, we would like to
> know about that too.
>
> The intention of the fix is to treat January as 1 instead of 0. Thus if I
> set the date as axutil_date_time_set_date_time(date_time, env, 2008, 1, 1,
> 12, 0, 0, 0), he should see it print as 2008-01-01T12:00:00.000Z rather
> than 2008-02-01T12:00:00.000Z. Also the serialize must be compatible with
> the deserialize, due to the same reason that we must not see month = month
> + 1.
>
> I fixed this bug but left out a required modification in
> axutil_date_time_create_with_offset() by mistake. Attached herewith is a
> diff to solve the issue.
>
> Regards,
> Senaka
>
>
>> Error in month in date_time
>> ---------------------------
>>
>> Key: AXIS2C-1013
>> URL: https://issues.apache.org/jira/browse/AXIS2C-1013
>> Project: Axis2-C
>> Issue Type: Bug
>> Components: util
>> Affects Versions: 1.3.0
>> Reporter: Senaka Fernando
>> Assignee: Senaka Fernando
>>
>>
>> Error in month in date_time. gmtime returns month as 0 rather than 1 for
>> January. This creates problems.
>>
>> Regards,
>> Senaka
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: util/src/date_time.c
>> ===================================================================
>> --- util/src/date_time.c (revision 631504)
>> +++ util/src/date_time.c (working copy)
>> @@ -61,7 +61,7 @@
>> utc_time = gmtime(&t);
>>
>> date_time->year = utc_time->tm_year;
>> - date_time->mon = utc_time->tm_mon;
>> + date_time->mon = utc_time->tm_mon + 1;
>> date_time->day = utc_time->tm_mday;
>> date_time->hour = utc_time->tm_hour;
>> date_time->min = utc_time->tm_min;
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
--
http://blog.kaushalye.org/
http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: [jira] Created: (AXIS2C-1013) Error in month in date_time
Posted by Senaka Fernando <se...@wso2.com>.
A late fix in axutil_date_time, has created an issue in handling the month
of the day due to gmtime treating January as zero. The fix has been
applied partially leaving a bug when we call the function
axutil_date_time_create_with_offset(). We won't be fixing this for 1.3.0
as the release is so near and will do it as soon as the release is done.
This may cause issues with Timestamp generations especially in Rampart/C
and if you are working from the head, until the release is done. If there
are anyone else who are experiencing similar problems, we would like to
know about that too.
The intention of the fix is to treat January as 1 instead of 0. Thus if I
set the date as axutil_date_time_set_date_time(date_time, env, 2008, 1, 1,
12, 0, 0, 0), he should see it print as 2008-01-01T12:00:00.000Z rather
than 2008-02-01T12:00:00.000Z. Also the serialize must be compatible with
the deserialize, due to the same reason that we must not see month = month
+ 1.
I fixed this bug but left out a required modification in
axutil_date_time_create_with_offset() by mistake. Attached herewith is a
diff to solve the issue.
Regards,
Senaka
> Error in month in date_time
> ---------------------------
>
> Key: AXIS2C-1013
> URL: https://issues.apache.org/jira/browse/AXIS2C-1013
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: 1.3.0
> Reporter: Senaka Fernando
> Assignee: Senaka Fernando
>
>
> Error in month in date_time. gmtime returns month as 0 rather than 1 for
> January. This creates problems.
>
> Regards,
> Senaka
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
[jira] Resolved: (AXIS2C-1013) Error in month in date_time
Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Senaka Fernando resolved AXIS2C-1013.
-------------------------------------
Resolution: Fixed
Fix Version/s: Current (Nightly)
Fixed Issue
> Error in month in date_time
> ---------------------------
>
> Key: AXIS2C-1013
> URL: https://issues.apache.org/jira/browse/AXIS2C-1013
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: 1.3.0
> Reporter: Senaka Fernando
> Assignee: Senaka Fernando
> Fix For: Current (Nightly)
>
>
> Error in month in date_time. gmtime returns month as 0 rather than 1 for January. This creates problems.
> Regards,
> Senaka
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org