ohmage / server

The ohmage server application.
37 stars 25 forks source link

Being more specific about ISO8601 #407

Closed jeroen closed 11 years ago

jeroen commented 12 years ago

ISO8601 specifies a lot of different ways of formatting dates and timestamps. We should probably be a bit more specific what format we really expect.

For example, javascript by default uses this format:

new Date().toISOString() "2012-09-07T17:10:17.235Z

However ohmage doesn't seem to like this at all.

Apparently, strickly speaking, ISO8601 is not a standard for formatting dates in itself; it is a standard for describing formats. Also see the last reply on this topic on SO.

jshslsky commented 12 years ago

Yes, this is a good idea. For Open mHealth we are using the W3C version of ISO8601 dates.

jeroen commented 12 years ago

Ah cool! I was not aware that this existed. That seems like a nice subset indeed. ISO8601 is way to general.

jshslsky commented 12 years ago

Out of curiosity, what APIs are you attempting to interact with using JS?

jeroen commented 12 years ago

Mobility stuff for the OMH reporting.

jshslsky commented 12 years ago

Were you trying to upload data or just read?

jeroen commented 12 years ago

Just reading. I was using mobility/dates/read

On Fri, Sep 7, 2012 at 11:19 AM, Joshua Selsky notifications@github.comwrote:

Were you trying to upload data or just read?

— Reply to this email directly or view it on GitHubhttps://github.com/cens/ohmageServer/issues/407#issuecomment-8373979.

jojenki commented 11 years ago

@joshuaselsky Is this commit sufficient to close this issue?

jshslsky commented 11 years ago

We are only using this formatter for omh/read, correct? I think we should use it across all ohmage APIs, but that will probably break backwards compatibility.

hongsudt commented 11 years ago

We don't want to break backwards compatibility though.. It will make it much harder to upgrade server during deployment.

On Mon, Oct 22, 2012 at 11:03 AM, Joshua Selsky notifications@github.comwrote:

We are only using this formatter for omh/read, correct? I think we should use it across all ohmage APIs, but that will probably break backwards compatibility.

— Reply to this email directly or view it on GitHubhttps://github.com/cens/ohmageServer/issues/407#issuecomment-9674089.

jojenki commented 11 years ago

I agree that we don't want to break backwards compatibility until the next major version, so it seems like this cannot be fully implemented in any version 2.x. This is done for observers and Open mHealth APIs. Should we just move it to 3.0?

jshslsky commented 11 years ago

Yup. It was more of a question on my part whether this would break backwards compatibility. Either way, we would need to test and it's not a priority for 2.14.

jshslsky commented 11 years ago

Handled by OmH.