Use a standard interval format for server uptime in APIs

We will file suggestions here that did not make the cut. Don't expect detailed responses, but the most common reasons are:

  • implementing the suggestion is impractical, or too much work for the gain
  • the suggestion is thematically against our design philosophy
  • the suggestion is too detailed/low-level
    Keep your suggestions broad and focused on RP benefits, please, not detailed suggestions of how to fix everything.

Moderators: Active Admins, Forum Moderators, Active DMs, Contributors, Area Developers, Artist/Animator, Suggestion Moderators

Locked
User avatar
Kooshy
Posts: 18
Joined: Sun Nov 23, 2014 2:22 am

Use a standard interval format for server uptime in APIs

Post 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?
User avatar
Mithreas
Emeritus Admin
Emeritus Admin
Posts: 2555
Joined: Sat Sep 06, 2014 3:09 am

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

Post by Mithreas »

It would, but I'm too lazy. Sorry.
xkcd.com is best viewed with Netscape Navigator 4.0 or below on a Pentium 3±1 emulated in Javascript on an Apple IIGS at a screen resolution of 1024x1.For security reasons, please leave caps lock on while browsing.
Locked