Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2691

MySQL driver 8.0.x stores LocalDateTime differently than 5.1.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1.1, 4.2.M3
    • Database integration
    • None
    • MySQL

    Description

      MySQL driver version 8.0.x uses java default timezone info to adjust LocalDateTime value stored in the DB. This process is symmetrical, so the result is OK for the Cayenne itself. But the exact value is different from the 5.1.x version, and, more importantly, this could cause problems with other systems that could read values directly from the DB.

      The solution is to use additional Calendar parameter in the statement.setTimestamp(), statement.setDate() and statement.setTime() methods.

      See also this mail thread

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            ntimofeev Nikita Timofeev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: