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

Add support for UTC-forced DATE_PART functions

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.6.0, 5.0.0
    • 4.1.1
    • query
    • Query-Sprint-09-19-2016

    Description

      Currently, the DATE_PART suite of functions always operate in the timezone of the Couchbase Server. This can cause inconsistent behavior, for example working on your local machine in your local timezone versus a production cluster running in UTC.

      As an example:
      SELECT DATE_PART_MILLIS(STR_TO_MILLIS('2016-05-15T00:00:00Z'), 'day')

      Will return this result if the server is in UTC:
      15

      And this result if the server is in Eastern Daylight Time:
      14

      It would be helpful to have either a set alternative implementations (i.e. DATE_PART_UTC_MILLIS, etc) that always return the result based on UTC, or an optional parameter to the existing functions to specify the time zone.

      Attachments

        For Gerrit Dashboard: MB-19773
        # Subject Branch Project Status CR V

        Activity

          People

            prasanna.gholap Prasanna Gholap [X] (Inactive)
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty