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

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.3-GA
    • 2.0.4
    • other
    • 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

              diego dupin Diego Dupin
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.