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

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

      Applied

    • 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.
    • Show
      https://www.oasis-open.org/committees/download.php/57687/odata-v4.0-wd08-part2-url-conventions-2016-03-03.docx

      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

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: