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

5.1.1.2.1 Addition and 5.1.1.2.2 Subtraction: Date add/sub Duration is DateTimeOffset - but in which time zone?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      Applied

    • Proposal:
      Hide

      Rules are actually present in XML Schema 1.1 Part 2: E.3.3 Adding Durations to DateTime.

      Rules:
      1) Convert date to datetime (in any timezone) with zero hh:mm:ss
      2) Add/subtract duration
      3) Convert to date by dropping fractional days and timezone

      Thus today + 1 second is today. Today minus 1 second is yesterday.

      Show
      Rules are actually present in XML Schema 1.1 Part 2: E.3.3 Adding Durations to DateTime. Rules: 1) Convert date to datetime (in any timezone) with zero hh:mm:ss 2) Add/subtract duration 3) Convert to date by dropping fractional days and timezone Thus today + 1 second is today. Today minus 1 second is yesterday.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/57687/odata-v4.0-wd08-part2-url-conventions-2016-03-03.docx

      Description

      The cited sections allow these operations but fail to provide guidance on how to implement them.

      DateTimeOffset must have a time zone, date cannot have a time zone.

      It would be better to

      • disallow these operations altogether
      • define the result type as Date and specify how to round or ignore sub-day duration portions

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: