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

Retrieving LocalDateTime from DATETIME differs around DST transitions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.5.3, 3.5.5
    • 3.5.9
    • datetime
    • None

    Description

      When storing date and time information in a DATETIME column, which doesn't represent a specific point in time, the retrieval differs for daylight saving changes. For example, if the TimeZone is Europe/Vienna and the time is '2024-03-31 02:45:00' this is an invalid time (as the hour between 2 and 3 is "lost") and the result is moved one hour later to '2024-03-31 03:45:00'.

      The LocalDateTimeCodec.decodeText() function delegates to ZonedDateTimeCodec which is creating an intermediate ZonedDateTime using TimeZone.getDefault() and then extracts the LocalDateTime part. This seems to cause the move of one hour.

      The expected behavior is to retrieve the LocalDateTime info equal to the date and time parts originally sent to the database.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            ega@admin-iq.at Alois Egger
            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.