Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-29357

DATE_TRUNC_STR regression for date/times ending in "Z"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.0
    • 5.5.0
    • query
    • using image "couchbase/server:5.5.0-beta" in Docker for Windows
    • Untriaged
    • Ubuntu 64-bit
    • Yes

    Description

      DATE_TRUNC_STR returns null for ISO8601 strings which end in "Z" (shortcut for UTC).

      To reproduce, use this query from the documentation:

      SELECT DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'day') as day,
             DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'month') as month,
             DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'year') as year;
      

      On 5.1.0, this outputs the expected results. On 5.5.0 Beta, it returns null for all 3 fields.

      This appears to only be related to the Z shortcut for UTC, if you include a specific offset of "+00:00" or no offset at all the function works correctly.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ajay.bhullar Ajay Bhullar
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty