How to set the Mysql Time Zone?

1

I took an old project in github, and the project was about a JSF application that was using the old mysql artifact as you can see below;

<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.25</version>
            <scope>compile</scope>
        </dependency>

and was generating errors, and by what I understood I should change to the version compatible with the version I was using in my database, so I checked the version of my command with the command;

SoItradedforthisartifact;

<dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.11</version></dependency>

WhenIsubmittedmyform,Icameacrossa500erroronthebrowserscreen,andwhenIcheckedtheerrorloginmyeclipseIfoundthiserrorbriefly;

  

Causedby:  com.mysql.cj.exceptions.InvalidConnectionAttributeException:The  servertimezonevalue'Brazilofficialtime'isunrecognizedor  morethanonetimezone.Youmustconfigureeitherthe  serverorJDBCdriver(viatheserverTimezoneconfigurationproperty)  touseamorespecifctimezonevalueifyouwanttousetimezone  support.

Soitwasaboutadjustingthetimezoneofmysql,buthowtodothat?Imademyattemptsandcouldnot,that'swhyI'maskingforhelp!

Imadetheseattempts

How to adjust the timezone or timezone on MySQL

How to configure the MySQL time zone by names.

With the command SELECT @@time_zone; gave this result below;

ThenIchangedbyexecutingthiscommand;

SET@@global.time_zone='+3:00';QUIT

I tried to run the command SET time_zone='America/Sao_Paulo'; but gave the wrong command.

After that, I ran the application again and it worked normally, but restarting the computer and trying everything again got back into trouble.

Please, I would like someone to explain to me how to correctly set the time zone so I have no problem running my applications.

    
asked by anonymous 01.05.2018 / 10:56

1 answer

1

I just solved.

In the persistece.xml file it was like this

<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/boleto"/> 

But now it's like this;

<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/boleto?serverTimezone=UTC"/> 

After the change worked perfectly.

    
03.05.2018 / 16:08
Dynamic form javascript ______ qstntxt ___

I have a small aesthetic problem in 1 dropdown menu.

The problem is this, I increase the padding in CSS (bottom and top) and change only occurs in the last "read" from the menu.

I have made several attempts and found which could change. Did the most spaced submenus stay.

Menu Link: link

    
______ ___ azszpr295546

Frederick had to make some adjustments in the CSS, let the comment in the code, but basically u have to set the %code% , but have to remember to adjust the %code% %% in %code% too. Basically that's it. But you tb need to adjust the heights of the + and - buttons for them to get centralizas. (I've done it but if u want to increase more u will need to center again, tb let it commented in CSS)

Here's how it was in the code below

%pre%
    
___