Question

Database configure date and time for your region?

Looking at the server settings by the commands:

SELECT @@GLOBAL.time_zone, @@SESSION.time_zone, now()

I noticed that the date and time are 3 hours too late, how can I configure it so that it gets the date and time from my region Brazil?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @bluemilhas,

I just noticed you’ve added the Tag for a Manage Datbase.

Unfortunately at this time, it seems that you can’t set this yourself rather annoyingly.

However, if you create a support ticket, to DigitalOcean support and they can manually set it for you :) Please note that changing the timezone will affect the whole cluster.

You can reach out to our support team via https://www.digitalocean.com/support/

Hope that helps!

Hi @bluemilhas,

Try to change the datetime format on your whole Droplet, that should do the trick. You can check a similar question here:

https://www.digitalocean.com/community/questions/timestamp-for-local-time

Most probably that’s your server’s timezone. You’ll need to change it using SSH. SSH to your droplet,

ssh root@YourDropletIp

As soon as you are in, you can check your timezone using the timedatectl command. The system timezone is configured by symlinking /etc/localtime to a binary timezone identifier in the /usr/share/zoneinfo directory. Alternatively, you can also check the current system’s timezone by displaying the contents of the /etc/timezone file.

cat /etc/timezone

There are a few possibilities to change the timezone. The first one is using timedatectl

timedatectl list-timezones

You’ll something like

Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara

Once you identify which time zone is accurate to your location, run the following command:

sudo timedatectl set-timezone your_time_zone

For example, to change the system’s timezone to Europe/Rome:

sudo timedatectl set-timezone Europe/Rome ```

Run the timedatectl command to verify the changes

Regards, KFSys