title: Trouble with timezone with hibernate and MySQL
body: <p>I am trying to configure hibernate(5.3.3 Final) with tomcat (8.5) and mysql (v.8.0.12). When I launch my HibernateTest.java (very simple code from tutorial, no problem here) with the hibernate.connection.url set as ‘jdbc:mysql://localhost:3306/sakila’ I am encountering the following error:</p>
  <pre><code>Caused by: java.sql.SQLException: The server time zone value 'Paris, Madrid 
  (heure d?été)' is unrecognized or represents more than one time zone. You 
  must configure either the server or JDBC driver (via the serverTimezone 
  configuration property) to use a more specifc time zone value if you want to 
  utilize time zone support.
  </code></pre>
  <p>MySQL is currently set on the ‘SYSTEM’ timezone for the global and the session (mysql&gt; select @@global.time_zone, @@session.time_zone). And my system timezone is indeed Paris/Madrid.
  In my hibernate.cfg.xml file, when I write the connection url :</p>
  <pre><code>jdbc:mysql://localhost:3306/sakila?useJDBCCompliantTimezoneShift=true;useLegacyDatetimeCode=false;serverTimezone=UTC;
  </code></pre>
  <p>The error is :</p>
  <pre><code>com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near '=false;serverTimezone=UTC;'.
  </code></pre>
  <p>It is not the problem mentioned in the stackoverflow post ‘issues with mysql server timezone and jdbc connection’, because the ‘&amp;’ is refused by eclipse, see screenshot attached of the hibernate.cfg.xml file :</p>
  <p>[The reference to entity &quot;useLegacyDatetimeCode&quot; must end with the delimiter ';']
  <a href="https://i.stack.imgur.com/WUQYU.png" rel="nofollow noreferrer">1</a></p>
  <p>It is not an invisible character between 'mysql:' and '//localhost' as mentioned in the stackoverflow post ‘Malformed database URL, failed to parse the main URL sections’.
  I’ve tried to work the problem around by setting via MySql Workbench the option for the local time (default-time-zone = '+02:00') which fits with the summer time for Madrid/Paris (my case here). It doesn’t change a thing.
  Any idea? Do I have to configure it somewhere else?
  Thank you for your help, I've been on this one for 3 days now, without success.</p>