axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damitha Kumarage (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2C-1350) Adding hours/mins/secs etc to the duration does not add up correctly
Date Thu, 08 Jul 2010 17:00:51 GMT

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

Damitha Kumarage updated AXIS2C-1350:
-------------------------------------

    Fix Version/s: Next Version

> 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
>             Fix For: Next Version
>
>
>     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.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message