[ 
https://issues.apache.org/jira/browse/CAY-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304015#comment-17304015
 ] 

Andrus Adamchik commented on CAY-2691:
--------------------------------------

I suppose we should port this to 4.1 as well. 

> MySQL driver 8.0.x stores LocalDateTime differently than 5.1.x
> --------------------------------------------------------------
>
>                 Key: CAY-2691
>                 URL: https://issues.apache.org/jira/browse/CAY-2691
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Database integration
>         Environment: MySQL
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2.M3
>
>
> 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|https://lists.apache.org/thread.html/r30735c36ba034e280c6a20f2a6910f1cb6aa1f906b6234b8b1c9fe1c%40%3Cuser.cayenne.apache.org%3E]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to