Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-124

For round-tripping values, what precision must agents support for DateTime(Offset), and are leap seconds permitted?



    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ABNF, CSDL XML
    • Labels:
    • Environment:



      We should define a minimum precision that agents must support for DateTime(Offset) when progapating values or proxying requests, and be explicit about whether leap seconds can/must be supported.

      Assuming for a moment that OData DateTime(Offset) does not support leap seconds, then suppose a computer system that implements "leap smear" over a day, by 1,000,000 microseconds smeared evenly over a day. That is approximately 12 (11.57) microseconds per second. The point here is that allowing for microsecond precision in DateTime(Offset) values in this case would amount to a "false" precision (the value may be less "accurate" than it is "precise"), given the variable length of seconds from day to day (the day before the leap second is observed, and the day the leap second is observed).

      Now while I appreciate that the lexical representation of date/times in OData V3 allows seconds=60 and that therefore presumably the intention was to support leap seconds, OData is likely to be used frequently together with HTML5 (which does not permit leap seconds or sub-millisecond precision), so I would recommend that OData should align with HTML5 and disallow leap seconds and sub-millisecond precision.

      See also: http://blogs.msdn.com/b/ericlippert/archive/2010/04/08/precision-and-accuracy-of-datetime.aspx




            • Assignee:
              handl Ralf Handl
              evan.ireland.2 Evan Ireland
            • Watchers:
              1 Start watching this issue


              • Created: