R
Railway4mo ago
Posho

Changing MySQL Timezone

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!
Solution:
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....
Jump to solution
5 Replies
Percy
Percy4mo ago
Project ID: 182bca06-c783-437a-885c-7da3d8bf8d11
Posho
PoshoOP4mo ago
182bca06-c783-437a-885c-7da3d8bf8d11 Any help? 👉️👈️
Solution
Brody
Brody4mo 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.
Posho
PoshoOP4mo ago
Nevermind, I just figured it out.
SET GLOBAL time_zone = 'America/Monterrey';
SET GLOBAL time_zone = 'America/Monterrey';
I'm so sorry. Actually, what you're saying makes more sense. I'll look into that. Thank you very much.
Brody
Brody4mo ago
no problem!
Want results from more Discord servers?
Add your server