Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1171

timezone support missing feature

    XMLWordPrintable

Details

    Description

      MariaDB server doesn't support date time with timezone. So recommandation is to have one common timezone shared between all client and server. but this is not always the case. Even more complicated there is cases when different client are running with JVM in multiple timezone, so different than server.

      Recommendation might be then to have another field containing offset in minutes for those cases.

      At the same time, since MySQL 8.0.23+ have defined new options for that, connector will have to implement them to permit compatibility and solution for all cases.

      The goal of this is multiple :

      • Documentation
        • Timezone support is not detailed in documentation, this is mostly the biggest hole in java documentation
        • describe recommandation for those cases
      • Implementation
        • describe 2.x to 3.x migration
        • add compatibility with mysql 8.0.23 new option

      Options are :

      • connectionTimeZone=LOCAL|SERVER|user-defined time zone (previously known as ‘serverTimezone’, now with additional fixed values) defines how the server’s session time zone is to be determined by Connector/J.
      • forceConnectionTimeZoneToSession=true|false controls whether the session time_zone variable is to be set to the value specified in ‘connectionTimeZone’.
      • preserveInstants=true|false turns on|off the conversion of instant values between JVM and ‘connectionTimeZone’.

      Those option will permit compatibility with existing supported connector version :

      • 2.x : "connectionTimeZone=LOCAL&forceConnectionTimeZoneToSession=false" is connector 2.x default behavior, while "connectionTimeZone=SERVER&preserveInstants=true" corresponds to 2.x "useLegacyDatetimeCode=false"
      • "connectionTimeZone=LOCAL&forceConnectionTimeZoneToSession=true" is 3.x default behavior.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.