MySQL current_timestamp using GMT

0

I am testing with a MySQL instance using EU-West-2 (London) as the server. When I run SQL statement with current_timestamp() i get GMT rather than BST. How can I change this so it shows the correct time all year

asked a year ago332 views
1 Answer
0

If this is an EC2 server where you're running a MySQL server, I suspect that it's just picking up BST as the server timezone.

If this is the case, you can change the timezone for the mysqld process as documented here - https://docs.oracle.com/en-us/iaas/mysql-database/doc/changing-timezone-db-system.html

If you're running an RDS instance with MySQL, this document describes how to set the timezone - https://repost.aws/knowledge-center/rds-change-time-zone

profile picture
answered a year ago
  • The default_time_zone parameter isn't modifiable so it runs on the server time which is GMT. So if I've got a stored procedure which uses current_timestamp() it will give me the wrong time

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions