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

str_to_utc function error

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • 6.0.0
    • 6.0.0
    • query
    • Untriaged
    • Centos 64-bit
    • No

    Description

      To be able to reproduce this bug, there must be local time when local date and UTC timezone date are different, for example, every day after 5:00 PM PST has say 18 of September, but UTC timezone has 00:00 AM 19 of September.

      In these time frames run the following query:

      select
      clock_utc("2006-01-02T01:01:01") as utctime,
      str_to_utc(clock_str("2006-01-02T01:01:01")) as converted_from_local_utc_timeĀ 

      results will be, for example

      [

      { "converted_from_local_utc_time": "2018-09-19T00:07:54.727", "utctime": "2018-09-19T00:07:54.727" }

      ]

      Key feature - we have same date for both results.

      Now run the following:

      select
      clock_utc("2006-01-02") as utctime,
      str_to_utc(clock_str("2006-01-02")) as converted_from_local_utc_time

      results will be for example:

      [

      { "converted_from_local_utc_time": "2018-09-18", "utctime": "2018-09-19" }

      ]

      Error - we have different dates for these results.

      Attachments

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

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty