balanced / balanced-api

Balanced API specification.
220 stars 72 forks source link

Use consistent timestamps across Balanced API #609

Closed KeithTsui closed 9 years ago

KeithTsui commented 10 years ago

Seeing Balanced callback events with timestamps up to seconds precision while others go up to microseconds. Would be great to have a standardized notation for parsing purposes.

mjallday commented 10 years ago

https://en.wikipedia.org/wiki/ISO_8601 http://www.w3.org/TR/NOTE-datetime

It looks like they are both valid formats, note the last two lines in the table below.

   Year:
      YYYY (eg 1997)
   Year and month:
      YYYY-MM (eg 1997-07)
   Complete date:
      YYYY-MM-DD (eg 1997-07-16)
   Complete date plus hours and minutes:
      YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
   Complete date plus hours, minutes and seconds:
      YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
   Complete date plus hours, minutes, seconds and a decimal fraction of a
second
      YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)

Any compliant library should be able to parse them without issue.

Is there another reason for wanting the consistency?

mjallday commented 9 years ago

Closing this, Balanced always provides ISO 8601 compliant dates.