Changing MySQL Timezone

poshoHOBBY

9 months ago

I'm currently using Railway to host a MySQL database container. The default timezone of the MySQL server seems to be set to UTC, but I need to change it to a different timezone, specifically America/New_York.

I've searched through the Railway documentation but couldn't find any explicit instructions on how to achieve this. Could someone guide me on how to set or change the timezone of a MySQL container running on Railway? Is there an environment variable or a configuration setting that I can use?

Thanks in advance for your help!

0 Replies

poshoHOBBY

9 months ago

182bca06-c783-437a-885c-7da3d8bf8d11


poshoHOBBY

8 months ago

Any help? 👉️👈️


8 months ago

you would most definitely want to keep the time on the server / database as UTC, that is a standard practice.

if you need a different timezone, you would convert it for display purposes only.


poshoHOBBY

8 months ago

Nevermind, I just figured it out.

SET GLOBAL time_zone = 'America/Monterrey';

I'm so sorry.


poshoHOBBY

8 months ago

Actually, what you're saying make more sense. I'll look into that. Thank you very much.


8 months ago

no problem!