Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-62

Support named timezones and daylight savings time

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3-GA
    • Fix Version/s: 2.0.4
    • Component/s: other
    • Labels:
      None

      Description

      MariaDB Connector/node.JS only appears to have very limited timezone support at the moment:

      timezone
      Forces use of the indicated timezone, rather than the current Node.js timezone. Possible values are Z for UTC, local or ±HH:MM format

      https://mariadb.com/kb/en/library/nodejs-connection-options/#other-options

      https://github.com/MariaDB/mariadb-connector-nodejs/blob/0b2a9296f3b555baefe1fc631ae4fbb772bff8b5/lib/config/connection-options.js#L78

      The connector should also support named time zones, just as the server does. Otherwise, the connector can't handle daylight savings time.

      https://mariadb.com/kb/en/library/time-zones/#setting-the-time-zone

      It looks like time zones might currently be implemented this way because the connector tries to do a simplistic form of time zone conversions on its own:

      https://github.com/MariaDB/mariadb-connector-nodejs/blob/0b2a9296f3b555baefe1fc631ae4fbb772bff8b5/lib/cmd/common-text-cmd.js#L388

      But why doesn't the connector just do SET SESSION time_zone = "..." and let the server handle the time zone conversions?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              GeoffMontee Geoff Montee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration