Time Zone Name in MySQL: How to Detect the Current One

The time zone name of the MySQL server you are connected to takes one line to read. MySQL developers and DBAs regularly need the time zone of the session they are connected to. The MySQL documentation and search engines give many ways to do it. In this post, I show the simple method I use.

The query SELECT @@system_time_zone; with its result, a single row with the column @@system_time_zone and the value India Standard Time

The Query

Run the following script against your MySQL server:

SELECT @@system_time_zone;

The Result

It returns a result set with the name of your time zone. I am in India, and my machine’s time zone is India Standard Time. So the result contains the same.

MySQL query editor with the query SELECT @@system_time_zone; and a result grid showing India Standard Time

Your Turn

Let me know if you use another method to retrieve the time zone of the server where MySQL is installed.

Quick reference card: MySQL time zone name

A time zone is not a setting you guess, it is one line you can read.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

MySQL, SQL Command, SQL DateTime
Previous Post
SQL SERVER – Get Current TimeZone Name in SQL Server
Next Post
The Native JSON Data Type in SQL Server 2025

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.