[ 
https://issues.apache.org/jira/browse/AXIS2C-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

S.Uthaiyashankar updated AXIS2C-1350:
-------------------------------------

    Component/s: util

> Adding hours/mins/secs etc to the duration does not add up correctly
> --------------------------------------------------------------------
>
>                 Key: AXIS2C-1350
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1350
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>            Reporter: Damitha Kumarage
>
>     axis2_char_t *duration_str = "P19Y6M4DT12H30M5S";
>     printf("input:%s\n",  duration_str);
>     axutil_duration_t *duration = NULL;
>     axis2_char_t *result = NULL;
>     duration = axutil_duration_create_from_string(env, duration_str);
>     int hours = axutil_duration_get_hours(duration, env);
>     axutil_duration_set_hours(duration, env, hours + 13);
>     result = axutil_duration_serialize_duration(duration, env);
>     printf("result:%s\n", result);
> The output of the above program should ideally be
> input:P19Y6M4DT12H30M5S
> result:P19Y6M5DT1H30M5.000000S
> But it is actually is
> input:P19Y6M4DT12H30M5S
> result:P19Y6M4DT25H30M5.000000S
> When hours exceed 24 it should be counted as 1 days and 1 hour instead of 25 
> hours. This problem is there for other time units as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to