title: shift in mysql between sql timestamp and the hour I put
body: <p>I am using intellij for a javaee project and I get problems with time storage : there is a shift of 2 hours between what I put and the hour really stored in mysql.</p>
  
  <p>some searches on internet gave nothing at the moment.</p>
  
  <p>here is the java statement in which I set the hour of 15:30</p>
  
  <pre><code>Bien bien = new Bien(0, "mon super bien #2", 320, 5, 3, true,
                  520000, "4 impasse des bleuets",
                  LocalDateTime.of(2019, Month.MAY,1,15,30),
                  false, bien0.getTypeChauffage(), bien0.getOptions(), bien0.getVille());
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/U1BfW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U1BfW.png" alt="enter image description here"></a></p>
  
  <p>and you can see on the picture at the right that the stored hour is 13:30!! 2 hours were lost.</p>
  
  <p>some informations :</p>
  
  <p>I live in France, which is UTC+2 on summer hour; so I put this line in mysql' my.ini:</p>
  
  <blockquote>
    <p>default-time-zone='+02:00'</p>
  </blockquote>
  
  <p>and in phpmyadmin, if I type </p>
  
  <pre><code>select now();
  </code></pre>
  
  <p>I get the correct hour.</p>
  
  <p>The wrong time is got from both intellij and phpmyadmin.
  The wrong time was got even before changing the default-time-zone in mysql.(but when I changed the timezone the previously entered datetime were shifted).
  the conection string is very usual,without any extra parameter(only database, port,user,password).</p>
  
  <p>I will continue to search, but if someone can help me it would be kind.</p>
  
  <p>here is an output from phpMyAdmin:
  <a href="https://i.stack.imgur.com/fMGke.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fMGke.png" alt="enter image description here"></a></p>