Page 1 of 1

Use a standard interval format for server uptime in APIs

Posted: Tue Dec 02, 2014 10:14 pm
by Kooshy
Oh yes, it's me again. ..And I'm still tinkering in the APIs.

So, when a server is up for less than a day, its uptime is reported in hh:mm:ss format, which is handy and parses well. But once it's been up for a day, the format changes and it actually says "x days, hh:mm:ss." This is nice and human-readable, and is what the portal page says, but it crashes .NET's built-in interval parser because it isn't strictly an interval format.

..I can work around it, but wouldn't it make more sense to do the human-readable formatting on the portal front-end and leave the API in a more readily parsable format, like dd:hh:mm:ss?

Re: Use a standard interval format for server uptime in APIs

Posted: Fri Jan 30, 2015 7:54 pm
by Mithreas
It would, but I'm too lazy. Sorry.