On 18.12.2012 09:11, Martin Povolny wrote:
On Fri, Nov 30, 2012 at 11:43:19AM +0100, Jiří Stránský wrote:
>>>
>>> 3) <global_uptime>5 minutes</global uptime>
>>>
>>> *I'll implement a standard way to serialize duration information - from
XML Schema[2].* E.g. 5 minutes would serialize as "P5M". CIMI uses it as well.
>>
>> Sounds good. We should point to such documentation so people know what the
annotations mean.
>
> Ok :)
>
>>
Is this format generally supported by the tools available? A quick
search showed me support for XML Schema Time formats but not for
duration information.
Hmm you're right that there's not much support in Ruby. There is in Java. ;)
I can think of a compromise solution - using only seconds in the duration string. The
string would look like "PT12345S". This would be both valid XML Schema duration
and very easy to write custom parser for - there's not much to parse. :) And it would
also get rid of the ambiguity with leap seconds. Wondering if this solution would get some
+1s here.
J.